• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
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.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef CAMERA_MT9T013_H
20 #define CAMERA_MT9T013_H
21 #include <linux/cdev.h>
22 #include <linux/types.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/ioctl.h>
25 #include <asm/sizes.h>
26 #define MT9T013_I2C_IOCTL_MAGIC 'm'
27 #define MT9T013_I2C_IOCTL_W   _IOW(MT9T013_I2C_IOCTL_MAGIC, 0, unsigned)
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define MT9T013_I2C_IOCTL_R   _IOR(MT9T013_I2C_IOCTL_MAGIC, 1, unsigned)
30 #define MT9T013_I2C_IOCTL_AF_W   _IOW(MT9T013_I2C_IOCTL_MAGIC, 2, unsigned)
31 #define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET   _IO(MT9T013_I2C_IOCTL_MAGIC, 3)
32 #define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET_2   _IO(MT9T013_I2C_IOCTL_MAGIC, 4)
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define CAMERA_CONFIGURE_GPIOS   _IO(MT9T013_I2C_IOCTL_MAGIC, 7)
35 #define CAMERA_UNCONFIGURE_GPIOS   _IO(MT9T013_I2C_IOCTL_MAGIC, 8)
36 #define CAMERA_LENS_POWER_ON   _IO(MT9T013_I2C_IOCTL_MAGIC, 9)
37 #define CAMERA_LENS_POWER_OFF   _IO(MT9T013_I2C_IOCTL_MAGIC, 10)
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define MT9T013_I2C_IOCTL_CAMIF_APPS_RESET   _IO(MT9T013_I2C_IOCTL_MAGIC, 11)
40 #define CAMIO_VFE_MDC_CLK 1
41 #define CAMIO_MDC_CLK 2
42 #define CAMIO_VFE_CLK 3
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define MT9T013_I2C_IOCTL_CLK_ENABLE   _IOW(MT9T013_I2C_IOCTL_MAGIC, 12, unsigned)
45 #define MT9T013_I2C_IOCTL_CLK_DISABLE   _IOW(MT9T013_I2C_IOCTL_MAGIC, 13, unsigned)
46 #define MT9T013_I2C_IOCTL_CLK_SELECT   _IOW(MT9T013_I2C_IOCTL_MAGIC, 14, unsigned)
47 #define MT9T013_I2C_IOCTL_CLK_FREQ_PROG   _IOW(MT9T013_I2C_IOCTL_MAGIC, 15, unsigned)
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define CAMSENSOR_REG_INIT 0<<0
50 #define CAMSENSOR_REG_UPDATE_PERIODIC 1<<0
51 #define CAMSENSOR_TYPE_PREVIEW 0<<1
52 #define CAMSENSOR_TYPE_SNAPSHOT 1<<1
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define MT9T013_I2C_IOCTL_SENSOR_SETTING   _IOW(MT9T013_I2C_IOCTL_MAGIC, 16, uint32_t)
55 struct mt9t013_reg_struct
56 {
57  uint16_t vt_pix_clk_div;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  uint16_t vt_sys_clk_div;
60  uint16_t pre_pll_clk_div;
61  uint16_t pll_multiplier;
62  uint16_t op_pix_clk_div;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  uint16_t op_sys_clk_div;
65  uint16_t scale_m;
66  uint16_t row_speed;
67  uint16_t x_addr_start;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  uint16_t x_addr_end;
70  uint16_t y_addr_start;
71  uint16_t y_addr_end;
72  uint16_t read_mode;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  uint16_t x_output_size ;
75  uint16_t y_output_size;
76  uint16_t line_length_pck;
77  uint16_t frame_length_lines;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  uint16_t coarse_integration_time;
80  uint16_t fine_integration_time;
81 };
82 struct mt9t013_reg_pat {
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  struct mt9t013_reg_struct reg[2];
85 };
86 #define MT9T013_I2C_IOCTL_GET_REGISTERS   _IOR(MT9T013_I2C_IOCTL_MAGIC, 17, struct mt9t013_reg_pat *)
87 struct mt9t013_exposure_gain {
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  uint16_t gain;
90  uint16_t line;
91  uint32_t mode;
92 };
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define MT9T013_I2C_IOCTL_EXPOSURE_GAIN   _IOW(MT9T013_I2C_IOCTL_MAGIC, 18, struct exposure_gain *)
95 #define MT9T013_I2C_IOCTL_MOVE_FOCUS   _IOW(MT9T013_I2C_IOCTL_MAGIC, 19, uint32_t)
96 #define MT9T013_I2C_IOCTL_SET_DEFAULT_FOCUS   _IOW(MT9T013_I2C_IOCTL_MAGIC, 20, uint32_t)
97 #define MT9T013_I2C_IOCTL_POWER_DOWN   _IO(MT9T013_I2C_IOCTL_MAGIC, 21)
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 struct mt9t013_init {
100  int preview;
101  uint16_t chipid;
102 };
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define MT9T013_I2C_IOCTL_INIT   _IOWR(MT9T013_I2C_IOCTL_MAGIC, 22, struct mt9t013_init *)
105 #endif
106