1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef CAMERA_MT9T013_H
13 #define CAMERA_MT9T013_H
14 #include <linux/cdev.h>
15 #include <linux/types.h>
16 #include <linux/ioctl.h>
17 #include <asm/sizes.h>
19 #define MT9T013_I2C_IOCTL_MAGIC 'm'
21 #define MT9T013_I2C_IOCTL_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 0, unsigned)
23 #define MT9T013_I2C_IOCTL_R _IOR(MT9T013_I2C_IOCTL_MAGIC, 1, unsigned)
25 #define MT9T013_I2C_IOCTL_AF_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 2, unsigned)
27 #define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 3)
29 #define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET_2 _IO(MT9T013_I2C_IOCTL_MAGIC, 4)
31 #define CAMERA_CONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 7)
33 #define CAMERA_UNCONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 8)
35 #define CAMERA_LENS_POWER_ON _IO(MT9T013_I2C_IOCTL_MAGIC, 9)
37 #define CAMERA_LENS_POWER_OFF _IO(MT9T013_I2C_IOCTL_MAGIC, 10)
39 #define MT9T013_I2C_IOCTL_CAMIF_APPS_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 11)
41 #define CAMIO_VFE_MDC_CLK 1
42 #define CAMIO_MDC_CLK 2
43 #define CAMIO_VFE_CLK 3
45 #define MT9T013_I2C_IOCTL_CLK_ENABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 12, unsigned)
47 #define MT9T013_I2C_IOCTL_CLK_DISABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 13, unsigned)
49 #define MT9T013_I2C_IOCTL_CLK_SELECT _IOW(MT9T013_I2C_IOCTL_MAGIC, 14, unsigned)
51 #define MT9T013_I2C_IOCTL_CLK_FREQ_PROG _IOW(MT9T013_I2C_IOCTL_MAGIC, 15, unsigned)
53 #define CAMSENSOR_REG_INIT 0<<0
54 #define CAMSENSOR_REG_UPDATE_PERIODIC 1<<0
55 #define CAMSENSOR_TYPE_PREVIEW 0<<1
56 #define CAMSENSOR_TYPE_SNAPSHOT 1<<1
58 #define MT9T013_I2C_IOCTL_SENSOR_SETTING _IOW(MT9T013_I2C_IOCTL_MAGIC, 16, uint32_t)
60 struct mt9t013_reg_struct
62 uint16_t vt_pix_clk_div;
63 uint16_t vt_sys_clk_div;
64 uint16_t pre_pll_clk_div;
65 uint16_t pll_multiplier;
66 uint16_t op_pix_clk_div;
67 uint16_t op_sys_clk_div;
70 uint16_t x_addr_start;
72 uint16_t y_addr_start;
75 uint16_t x_output_size ;
76 uint16_t y_output_size;
77 uint16_t line_length_pck;
78 uint16_t frame_length_lines;
79 uint16_t coarse_integration_time;
80 uint16_t fine_integration_time;
83 struct mt9t013_reg_pat {
84 struct mt9t013_reg_struct reg[2];
87 #define MT9T013_I2C_IOCTL_GET_REGISTERS _IOR(MT9T013_I2C_IOCTL_MAGIC, 17, struct mt9t013_reg_pat *)
89 struct mt9t013_exposure_gain {
95 #define MT9T013_I2C_IOCTL_EXPOSURE_GAIN _IOW(MT9T013_I2C_IOCTL_MAGIC, 18, struct exposure_gain *)
97 #define MT9T013_I2C_IOCTL_MOVE_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 19, uint32_t)
99 #define MT9T013_I2C_IOCTL_SET_DEFAULT_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 20, uint32_t)
101 #define MT9T013_I2C_IOCTL_POWER_DOWN _IO(MT9T013_I2C_IOCTL_MAGIC, 21)
103 struct mt9t013_init {
108 #define MT9T013_I2C_IOCTL_INIT _IOWR(MT9T013_I2C_IOCTL_MAGIC, 22, struct mt9t013_init *)