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 __UAPI_LINUX_MSM_CAM_SENSOR_H
20 #define __UAPI_LINUX_MSM_CAM_SENSOR_H
21 #include <linux/v4l2-mediabus.h>
22 #include <media/msm_camsensor_sdk.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/types.h>
25 #include <linux/i2c.h>
26 #define I2C_SEQ_REG_SETTING_MAX 5
27 #define MSM_SENSOR_MCLK_8HZ 8000000
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define MSM_SENSOR_MCLK_16HZ 16000000
30 #define MSM_SENSOR_MCLK_24HZ 24000000
31 #define MAX_SENSOR_NAME 32
32 #define MAX_ACTUATOR_AF_TOTAL_STEPS 1024
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define MAX_OIS_MOD_NAME_SIZE 32
35 #define MAX_OIS_NAME_SIZE 32
36 #define MAX_OIS_REG_SETTINGS 800
37 #define MOVE_NEAR 0
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define MOVE_FAR 1
40 #define MSM_ACTUATOR_MOVE_SIGNED_FAR - 1
41 #define MSM_ACTUATOR_MOVE_SIGNED_NEAR 1
42 #define MAX_ACTUATOR_REGION 5
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define MAX_EEPROM_NAME 32
45 #define MAX_AF_ITERATIONS 3
46 #define MAX_NUMBER_OF_STEPS 47
47 #define MAX_REGULATOR 5
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define FLASH_QUERY_CURRENT 1
50 #define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A')
51 #define MSM_V4L2_PIX_FMT_META10 v4l2_fourcc('M', 'E', '1', '0')
52 #define MSM_V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4')
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define MSM_V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4')
55 #define MSM_V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4')
56 #define MSM_V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4')
57 enum flash_type {
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   LED_FLASH = 1,
60   STROBE_FLASH,
61   GPIO_FLASH
62 };
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 enum msm_sensor_resolution_t {
65   MSM_SENSOR_RES_FULL,
66   MSM_SENSOR_RES_QTR,
67   MSM_SENSOR_RES_2,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   MSM_SENSOR_RES_3,
70   MSM_SENSOR_RES_4,
71   MSM_SENSOR_RES_5,
72   MSM_SENSOR_RES_6,
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   MSM_SENSOR_RES_7,
75   MSM_SENSOR_INVALID_RES,
76 };
77 enum msm_camera_stream_type_t {
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79   MSM_CAMERA_STREAM_PREVIEW,
80   MSM_CAMERA_STREAM_SNAPSHOT,
81   MSM_CAMERA_STREAM_VIDEO,
82   MSM_CAMERA_STREAM_INVALID,
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 };
85 enum sensor_sub_module_t {
86   SUB_MODULE_SENSOR,
87   SUB_MODULE_CHROMATIX,
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   SUB_MODULE_ACTUATOR,
90   SUB_MODULE_EEPROM,
91   SUB_MODULE_LED_FLASH,
92   SUB_MODULE_STROBE_FLASH,
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   SUB_MODULE_CSID,
95   SUB_MODULE_CSID_3D,
96   SUB_MODULE_CSIPHY,
97   SUB_MODULE_CSIPHY_3D,
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   SUB_MODULE_OIS,
100   SUB_MODULE_EXT,
101   SUB_MODULE_IR_LED,
102   SUB_MODULE_IR_CUT,
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   SUB_MODULE_MAX,
105 };
106 enum {
107   MSM_CAMERA_EFFECT_MODE_OFF,
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   MSM_CAMERA_EFFECT_MODE_MONO,
110   MSM_CAMERA_EFFECT_MODE_NEGATIVE,
111   MSM_CAMERA_EFFECT_MODE_SOLARIZE,
112   MSM_CAMERA_EFFECT_MODE_SEPIA,
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114   MSM_CAMERA_EFFECT_MODE_POSTERIZE,
115   MSM_CAMERA_EFFECT_MODE_WHITEBOARD,
116   MSM_CAMERA_EFFECT_MODE_BLACKBOARD,
117   MSM_CAMERA_EFFECT_MODE_AQUA,
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   MSM_CAMERA_EFFECT_MODE_EMBOSS,
120   MSM_CAMERA_EFFECT_MODE_SKETCH,
121   MSM_CAMERA_EFFECT_MODE_NEON,
122   MSM_CAMERA_EFFECT_MODE_MAX
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 };
125 enum {
126   MSM_CAMERA_WB_MODE_AUTO,
127   MSM_CAMERA_WB_MODE_CUSTOM,
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129   MSM_CAMERA_WB_MODE_INCANDESCENT,
130   MSM_CAMERA_WB_MODE_FLUORESCENT,
131   MSM_CAMERA_WB_MODE_WARM_FLUORESCENT,
132   MSM_CAMERA_WB_MODE_DAYLIGHT,
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134   MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT,
135   MSM_CAMERA_WB_MODE_TWILIGHT,
136   MSM_CAMERA_WB_MODE_SHADE,
137   MSM_CAMERA_WB_MODE_OFF,
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   MSM_CAMERA_WB_MODE_MAX
140 };
141 enum {
142   MSM_CAMERA_SCENE_MODE_OFF,
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144   MSM_CAMERA_SCENE_MODE_AUTO,
145   MSM_CAMERA_SCENE_MODE_LANDSCAPE,
146   MSM_CAMERA_SCENE_MODE_SNOW,
147   MSM_CAMERA_SCENE_MODE_BEACH,
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149   MSM_CAMERA_SCENE_MODE_SUNSET,
150   MSM_CAMERA_SCENE_MODE_NIGHT,
151   MSM_CAMERA_SCENE_MODE_PORTRAIT,
152   MSM_CAMERA_SCENE_MODE_BACKLIGHT,
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   MSM_CAMERA_SCENE_MODE_SPORTS,
155   MSM_CAMERA_SCENE_MODE_ANTISHAKE,
156   MSM_CAMERA_SCENE_MODE_FLOWERS,
157   MSM_CAMERA_SCENE_MODE_CANDLELIGHT,
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159   MSM_CAMERA_SCENE_MODE_FIREWORKS,
160   MSM_CAMERA_SCENE_MODE_PARTY,
161   MSM_CAMERA_SCENE_MODE_NIGHT_PORTRAIT,
162   MSM_CAMERA_SCENE_MODE_THEATRE,
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164   MSM_CAMERA_SCENE_MODE_ACTION,
165   MSM_CAMERA_SCENE_MODE_AR,
166   MSM_CAMERA_SCENE_MODE_FACE_PRIORITY,
167   MSM_CAMERA_SCENE_MODE_BARCODE,
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   MSM_CAMERA_SCENE_MODE_HDR,
170   MSM_CAMERA_SCENE_MODE_MAX
171 };
172 enum csid_cfg_type_t {
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174   CSID_INIT,
175   CSID_CFG,
176   CSID_TESTMODE_CFG,
177   CSID_RELEASE,
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 };
180 enum csiphy_cfg_type_t {
181   CSIPHY_INIT,
182   CSIPHY_CFG,
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   CSIPHY_RELEASE,
185 };
186 enum camera_vreg_type {
187   VREG_TYPE_DEFAULT,
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189   VREG_TYPE_CUSTOM,
190 };
191 enum sensor_af_t {
192   SENSOR_AF_FOCUSSED,
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194   SENSOR_AF_NOT_FOCUSSED,
195 };
196 enum cci_i2c_master_t {
197   MASTER_0,
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   MASTER_1,
200   MASTER_MAX,
201 };
202 struct msm_camera_i2c_array_write_config {
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   struct msm_camera_i2c_reg_setting conf_array;
205   uint16_t slave_addr;
206 };
207 struct msm_camera_i2c_read_config {
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209   uint16_t slave_addr;
210   uint16_t reg_addr;
211   enum msm_camera_i2c_reg_addr_type addr_type;
212   enum msm_camera_i2c_data_type data_type;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214   uint16_t data;
215 };
216 struct msm_camera_csi2_params {
217   struct msm_camera_csid_params csid_params;
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219   struct msm_camera_csiphy_params csiphy_params;
220   uint8_t csi_clk_scale_enable;
221 };
222 struct msm_camera_csi_lane_params {
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224   uint16_t csi_lane_assign;
225   uint16_t csi_lane_mask;
226 };
227 struct csi_lane_params_t {
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229   uint16_t csi_lane_assign;
230   uint8_t csi_lane_mask;
231   uint8_t csi_if;
232   int8_t csid_core[2];
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234   uint8_t csi_phy_sel;
235 };
236 struct msm_sensor_info_t {
237   char sensor_name[MAX_SENSOR_NAME];
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239   uint32_t session_id;
240   int32_t subdev_id[SUB_MODULE_MAX];
241   int32_t subdev_intf[SUB_MODULE_MAX];
242   uint8_t is_mount_angle_valid;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244   uint32_t sensor_mount_angle;
245   int modes_supported;
246   enum camb_position_t position;
247 };
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 struct camera_vreg_t {
250   const char * reg_name;
251   int min_voltage;
252   int max_voltage;
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254   int op_mode;
255   uint32_t delay;
256   const char * custom_vreg_name;
257   enum camera_vreg_type type;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 };
260 struct sensorb_cfg_data {
261   int cfgtype;
262   union {
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264     struct msm_sensor_info_t sensor_info;
265     struct msm_sensor_init_params sensor_init_params;
266     void * setting;
267     struct msm_sensor_i2c_sync_params sensor_i2c_sync_params;
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269   } cfg;
270 };
271 struct csid_cfg_data {
272   enum csid_cfg_type_t cfgtype;
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274   union {
275     uint32_t csid_version;
276     struct msm_camera_csid_params * csid_params;
277     struct msm_camera_csid_testmode_parms * csid_testmode_params;
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279   } cfg;
280 };
281 struct csiphy_cfg_data {
282   enum csiphy_cfg_type_t cfgtype;
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284   union {
285     struct msm_camera_csiphy_params * csiphy_params;
286     struct msm_camera_csi_lane_params * csi_lane_params;
287   } cfg;
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 };
290 enum eeprom_cfg_type_t {
291   CFG_EEPROM_GET_INFO,
292   CFG_EEPROM_GET_CAL_DATA,
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294   CFG_EEPROM_READ_CAL_DATA,
295   CFG_EEPROM_WRITE_DATA,
296   CFG_EEPROM_GET_MM_INFO,
297   CFG_EEPROM_INIT,
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299 };
300 struct eeprom_get_t {
301   uint32_t num_bytes;
302 };
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304 struct eeprom_read_t {
305   uint8_t * dbuffer;
306   uint32_t num_bytes;
307 };
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309 struct eeprom_write_t {
310   uint8_t * dbuffer;
311   uint32_t num_bytes;
312 };
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 struct eeprom_get_cmm_t {
315   uint32_t cmm_support;
316   uint32_t cmm_compression;
317   uint32_t cmm_size;
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 };
320 struct msm_eeprom_info_t {
321   struct msm_sensor_power_setting_array * power_setting_array;
322   enum i2c_freq_mode_t i2c_freq_mode;
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324   struct msm_eeprom_memory_map_array * mem_map_array;
325 };
326 struct msm_ir_led_cfg_data_t {
327   enum msm_ir_led_cfg_type_t cfg_type;
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329   int32_t pwm_duty_on_ns;
330   int32_t pwm_period_ns;
331 };
332 struct msm_ir_cut_cfg_data_t {
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334   enum msm_ir_cut_cfg_type_t cfg_type;
335 };
336 struct msm_eeprom_cfg_data {
337   enum eeprom_cfg_type_t cfgtype;
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339   uint8_t is_supported;
340   union {
341     char eeprom_name[MAX_EEPROM_NAME];
342     struct eeprom_get_t get_data;
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344     struct eeprom_read_t read_data;
345     struct eeprom_write_t write_data;
346     struct eeprom_get_cmm_t get_cmm_data;
347     struct msm_eeprom_info_t eeprom_info;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349   } cfg;
350 };
351 enum msm_sensor_cfg_type_t {
352   CFG_SET_SLAVE_INFO,
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354   CFG_SLAVE_READ_I2C,
355   CFG_WRITE_I2C_ARRAY,
356   CFG_SLAVE_WRITE_I2C_ARRAY,
357   CFG_WRITE_I2C_SEQ_ARRAY,
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359   CFG_POWER_UP,
360   CFG_POWER_DOWN,
361   CFG_SET_STOP_STREAM_SETTING,
362   CFG_GET_SENSOR_INFO,
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364   CFG_GET_SENSOR_INIT_PARAMS,
365   CFG_SET_INIT_SETTING,
366   CFG_SET_RESOLUTION,
367   CFG_SET_STOP_STREAM,
368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369   CFG_SET_START_STREAM,
370   CFG_SET_SATURATION,
371   CFG_SET_CONTRAST,
372   CFG_SET_SHARPNESS,
373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374   CFG_SET_ISO,
375   CFG_SET_EXPOSURE_COMPENSATION,
376   CFG_SET_ANTIBANDING,
377   CFG_SET_BESTSHOT_MODE,
378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379   CFG_SET_EFFECT,
380   CFG_SET_WHITE_BALANCE,
381   CFG_SET_AUTOFOCUS,
382   CFG_CANCEL_AUTOFOCUS,
383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384   CFG_SET_STREAM_TYPE,
385   CFG_SET_I2C_SYNC_PARAM,
386   CFG_WRITE_I2C_ARRAY_ASYNC,
387   CFG_WRITE_I2C_ARRAY_SYNC,
388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389   CFG_WRITE_I2C_ARRAY_SYNC_BLOCK,
390   CFG_FW_UPDATE,
391   CFG_VCM_FW_UPDATE,
392 };
393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394 enum msm_actuator_cfg_type_t {
395   CFG_GET_ACTUATOR_INFO,
396   CFG_SET_ACTUATOR_INFO,
397   CFG_SET_DEFAULT_FOCUS,
398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399   CFG_MOVE_FOCUS,
400   CFG_SET_POSITION,
401   CFG_ACTUATOR_POWERDOWN,
402   CFG_ACTUATOR_POWERUP,
403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404   CFG_ACTUATOR_INIT,
405 };
406 struct msm_ois_opcode {
407   uint32_t prog;
408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409   uint32_t coeff;
410   uint32_t pheripheral;
411   uint32_t memory;
412 };
413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414 enum msm_ois_cfg_type_t {
415   CFG_OIS_INIT,
416   CFG_OIS_POWERDOWN,
417   CFG_OIS_POWERUP,
418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419   CFG_OIS_CONTROL,
420   CFG_OIS_I2C_WRITE_SEQ_TABLE,
421   CFG_OIS_I2C_READ_SEQ_TABLE,
422   CFG_OIS_READ_TIMER,
423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424   CFG_OIS_READ_TIMER_STOP,
425   CFG_OIS_GET_GYRO,
426 };
427 enum msm_ois_cfg_download_type_t {
428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429   CFG_OIS_DOWNLOAD,
430   CFG_OIS_DATA_CONFIG,
431 };
432 enum msm_ois_i2c_operation {
433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434   MSM_OIS_WRITE = 0,
435   MSM_OIS_POLL,
436 };
437 struct reg_settings_ois_t {
438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439   uint16_t reg_addr;
440   enum msm_camera_i2c_reg_addr_type addr_type;
441   uint32_t reg_data;
442   enum msm_camera_i2c_data_type data_type;
443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444   enum msm_ois_i2c_operation i2c_operation;
445   uint32_t delay;
446 };
447 struct msm_ois_params_t {
448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449   uint16_t data_size;
450   uint16_t setting_size;
451   uint32_t i2c_addr;
452   enum i2c_freq_mode_t i2c_freq_mode;
453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454   enum msm_camera_i2c_reg_addr_type i2c_addr_type;
455   enum msm_camera_i2c_data_type i2c_data_type;
456   struct reg_settings_ois_t * settings;
457 };
458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459 struct msm_ois_set_info_t {
460   struct msm_ois_params_t ois_params;
461 };
462 struct msm_actuator_move_params_t {
463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
464   int8_t dir;
465   int8_t sign_dir;
466   int16_t dest_step_pos;
467   int32_t num_steps;
468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
469   uint16_t curr_lens_pos;
470   struct damping_params_t * ringing_params;
471 };
472 struct msm_actuator_tuning_params_t {
473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
474   int16_t initial_code;
475   uint16_t pwd_step;
476   uint16_t region_size;
477   uint32_t total_steps;
478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
479   struct region_params_t * region_params;
480 };
481 struct park_lens_data_t {
482   uint32_t damping_step;
483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
484   uint32_t damping_delay;
485   uint32_t hw_params;
486   uint32_t max_step;
487 };
488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
489 struct msm_actuator_params_t {
490   enum actuator_type act_type;
491   uint8_t reg_tbl_size;
492   uint16_t data_size;
493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
494   uint16_t init_setting_size;
495   uint32_t i2c_addr;
496   enum i2c_freq_mode_t i2c_freq_mode;
497   enum msm_camera_i2c_reg_addr_type i2c_addr_type;
498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
499   enum msm_camera_i2c_data_type i2c_data_type;
500   struct msm_actuator_reg_params_t * reg_tbl_params;
501   struct reg_settings_t * init_settings;
502   struct park_lens_data_t park_lens;
503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
504 };
505 struct msm_actuator_set_info_t {
506   struct msm_actuator_params_t actuator_params;
507   struct msm_actuator_tuning_params_t af_tuning_params;
508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
509 };
510 struct msm_actuator_get_info_t {
511   uint32_t focal_length_num;
512   uint32_t focal_length_den;
513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
514   uint32_t f_number_num;
515   uint32_t f_number_den;
516   uint32_t f_pix_num;
517   uint32_t f_pix_den;
518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
519   uint32_t total_f_dist_num;
520   uint32_t total_f_dist_den;
521   uint32_t hor_view_angle_num;
522   uint32_t hor_view_angle_den;
523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
524   uint32_t ver_view_angle_num;
525   uint32_t ver_view_angle_den;
526 };
527 enum af_camera_name {
528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
529   ACTUATOR_MAIN_CAM_0,
530   ACTUATOR_MAIN_CAM_1,
531   ACTUATOR_MAIN_CAM_2,
532   ACTUATOR_MAIN_CAM_3,
533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
534   ACTUATOR_MAIN_CAM_4,
535   ACTUATOR_MAIN_CAM_5,
536   ACTUATOR_WEB_CAM_0,
537   ACTUATOR_WEB_CAM_1,
538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
539   ACTUATOR_WEB_CAM_2,
540 };
541 struct msm_ois_slave_info {
542   char ois_name[MAX_OIS_NAME_SIZE];
543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
544   uint32_t i2c_addr;
545   struct msm_ois_opcode opcode;
546 };
547 struct ois_position {
548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
549   uint8_t data0;
550   uint8_t data1;
551   uint8_t data2;
552   uint8_t data3;
553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
554   uint8_t data4;
555   uint8_t data5;
556   uint8_t data6;
557   uint8_t data7;
558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
559 };
560 struct msm_ois_readout {
561   int16_t ois_x_shift;
562   int16_t ois_y_shift;
563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
564   int64_t readout_time;
565 };
566 struct ois_gyro {
567   uint8_t query_size;
568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
569   struct msm_ois_readout * gyro_data;
570 };
571 struct msm_ois_cfg_data {
572   int cfgtype;
573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
574   struct ois_position pos;
575   union {
576     struct msm_ois_set_info_t set_info;
577     struct msm_camera_i2c_seq_reg_setting * settings;
578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
579     struct ois_gyro gyro;
580   } cfg;
581 };
582 struct msm_ois_cfg_download_data {
583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
584   int cfgtype;
585   struct msm_ois_slave_info slave_info;
586 };
587 struct msm_actuator_set_position_t {
588 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
589   uint16_t number_of_steps;
590   uint32_t hw_params;
591   uint16_t pos[MAX_NUMBER_OF_STEPS];
592   uint16_t delay[MAX_NUMBER_OF_STEPS];
593 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
594 };
595 struct msm_actuator_cfg_data {
596   int cfgtype;
597   uint8_t is_af_supported;
598 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
599   union {
600     struct msm_actuator_move_params_t move;
601     struct msm_actuator_set_info_t set_info;
602     struct msm_actuator_get_info_t get_info;
603 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
604     struct msm_actuator_set_position_t setpos;
605     enum af_camera_name cam_name;
606   } cfg;
607 };
608 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
609 enum msm_camera_led_config_t {
610   MSM_CAMERA_LED_OFF,
611   MSM_CAMERA_LED_LOW,
612   MSM_CAMERA_LED_HIGH,
613 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
614   MSM_CAMERA_LED_INIT,
615   MSM_CAMERA_LED_RELEASE,
616 };
617 struct msm_camera_led_cfg_t {
618 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
619   enum msm_camera_led_config_t cfgtype;
620   int32_t torch_current[MAX_LED_TRIGGERS];
621   int32_t flash_current[MAX_LED_TRIGGERS];
622   int32_t flash_duration[MAX_LED_TRIGGERS];
623 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
624 };
625 struct msm_flash_init_info_t {
626   enum msm_flash_driver_type flash_driver_type;
627   uint32_t slave_addr;
628 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
629   enum i2c_freq_mode_t i2c_freq_mode;
630   struct msm_sensor_power_setting_array * power_setting_array;
631   struct msm_camera_i2c_reg_setting_array * settings;
632 };
633 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
634 struct msm_flash_cfg_data_t {
635   enum msm_flash_cfg_type_t cfg_type;
636   int32_t flash_current[MAX_LED_TRIGGERS];
637   int32_t flash_duration[MAX_LED_TRIGGERS];
638 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
639   union {
640     struct msm_flash_init_info_t * flash_init_info;
641     struct msm_camera_i2c_reg_setting_array * settings;
642   } cfg;
643 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
644 };
645 struct msm_flash_query_data_t {
646   int32_t flags;
647   int32_t query_type;
648 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
649   int32_t max_avail_curr;
650 };
651 enum msm_sensor_init_cfg_type_t {
652   CFG_SINIT_PROBE,
653 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
654   CFG_SINIT_PROBE_DONE,
655   CFG_SINIT_PROBE_WAIT_DONE,
656 };
657 struct sensor_init_cfg_data {
658 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
659   enum msm_sensor_init_cfg_type_t cfgtype;
660   struct msm_sensor_info_t probed_info;
661   char entity_name[MAX_SENSOR_NAME];
662   union {
663 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
664     void * setting;
665   } cfg;
666 };
667 #define VIDIOC_MSM_SENSOR_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data)
668 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
669 #define VIDIOC_MSM_SENSOR_RELEASE _IO('V', BASE_VIDIOC_PRIVATE + 2)
670 #define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID _IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t)
671 #define VIDIOC_MSM_CSIPHY_IO_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data)
672 #define VIDIOC_MSM_CSID_IO_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data)
673 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
674 #define VIDIOC_MSM_ACTUATOR_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data)
675 #define VIDIOC_MSM_FLASH_LED_DATA_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t)
676 #define VIDIOC_MSM_EEPROM_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data)
677 #define VIDIOC_MSM_SENSOR_GET_AF_STATUS _IOWR('V', BASE_VIDIOC_PRIVATE + 9, uint32_t)
678 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
679 #define VIDIOC_MSM_SENSOR_INIT_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data)
680 #define VIDIOC_MSM_OIS_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_ois_cfg_data)
681 #define VIDIOC_MSM_FLASH_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t)
682 #define VIDIOC_MSM_OIS_CFG_DOWNLOAD _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_ois_cfg_download_data)
683 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
684 #define VIDIOC_MSM_FLASH_QUERY_DATA _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_flash_query_data_t)
685 #define VIDIOC_MSM_IR_LED_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_led_cfg_data_t)
686 #define VIDIOC_MSM_IR_CUT_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_cut_cfg_data_t)
687 #endif
688 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
689 
690