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 __LINUX_MSM_CAM_SENSOR_H 20 #define __LINUX_MSM_CAM_SENSOR_H 21 #ifdef MSM_CAMERA_BIONIC 22 #include <sys/types.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #endif 25 #include <linux/types.h> 26 #include <linux/v4l2-mediabus.h> 27 #include <linux/i2c.h> 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define I2C_SEQ_REG_SETTING_MAX 5 30 #define I2C_SEQ_REG_DATA_MAX 20 31 #define MAX_CID 16 32 #define MSM_SENSOR_MCLK_8HZ 8000000 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define MSM_SENSOR_MCLK_16HZ 16000000 35 #define MSM_SENSOR_MCLK_24HZ 24000000 36 #define GPIO_OUT_LOW (0 << 1) 37 #define GPIO_OUT_HIGH (1 << 1) 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define CSI_EMBED_DATA 0x12 40 #define CSI_RESERVED_DATA_0 0x13 41 #define CSI_YUV422_8 0x1E 42 #define CSI_RAW8 0x2A 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define CSI_RAW10 0x2B 45 #define CSI_RAW12 0x2C 46 #define CSI_DECODE_6BIT 0 47 #define CSI_DECODE_8BIT 1 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define CSI_DECODE_10BIT 2 50 #define CSI_DECODE_DPCM_10_8_10 5 51 #define MAX_SENSOR_NAME 32 52 #define MAX_ACT_MOD_NAME_SIZE 32 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define MAX_ACT_NAME_SIZE 32 55 #define NUM_ACTUATOR_DIR 2 56 #define MAX_ACTUATOR_SCENARIO 8 57 #define MAX_ACTUATOR_REGION 5 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define MAX_ACTUATOR_INIT_SET 12 60 #define MAX_ACTUATOR_REG_TBL_SIZE 8 61 #define MOVE_NEAR 0 62 #define MOVE_FAR 1 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define MAX_EEPROM_NAME 32 65 enum msm_camera_i2c_reg_addr_type { 66 MSM_CAMERA_I2C_BYTE_ADDR = 1, 67 MSM_CAMERA_I2C_WORD_ADDR, 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 MSM_CAMERA_I2C_3B_ADDR, 70 }; 71 enum msm_camera_i2c_data_type { 72 MSM_CAMERA_I2C_BYTE_DATA = 1, 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 MSM_CAMERA_I2C_WORD_DATA, 75 MSM_CAMERA_I2C_SET_BYTE_MASK, 76 MSM_CAMERA_I2C_UNSET_BYTE_MASK, 77 MSM_CAMERA_I2C_SET_WORD_MASK, 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 MSM_CAMERA_I2C_UNSET_WORD_MASK, 80 MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, 81 }; 82 enum msm_sensor_power_seq_type_t { 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 SENSOR_CLK, 85 SENSOR_GPIO, 86 SENSOR_VREG, 87 SENSOR_I2C_MUX, 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 }; 90 enum msm_sensor_clk_type_t { 91 SENSOR_CAM_MCLK, 92 SENSOR_CAM_CLK, 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 SENSOR_CAM_CLK_MAX, 95 }; 96 enum msm_sensor_power_seq_gpio_t { 97 SENSOR_GPIO_RESET, 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 SENSOR_GPIO_STANDBY, 100 SENSOR_GPIO_VANA, 101 SENSOR_GPIO_VDIG, 102 SENSOR_GPIO_VIO, 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 SENSOR_GPIO_VCM, 105 SENSOR_GPIO_OIS_LDO_EN, 106 SENSOR_GPIO_OIS_RESET, 107 SENSOR_GPIO_MAX, 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 }; 110 enum msm_camera_vreg_name_t { 111 CAM_VDIG, 112 CAM_VIO, 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 CAM_VANA, 115 CAM_VAF, 116 CAM_VREG_MAX, 117 }; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 enum msm_sensor_resolution_t { 120 MSM_SENSOR_RES_FULL, 121 MSM_SENSOR_RES_QTR, 122 MSM_SENSOR_RES_2, 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 MSM_SENSOR_RES_3, 125 MSM_SENSOR_RES_4, 126 MSM_SENSOR_RES_5, 127 MSM_SENSOR_RES_6, 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 MSM_SENSOR_RES_7, 130 MSM_SENSOR_INVALID_RES, 131 }; 132 enum sensor_sub_module_t { 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 SUB_MODULE_SENSOR, 135 SUB_MODULE_CHROMATIX, 136 SUB_MODULE_ACTUATOR, 137 SUB_MODULE_EEPROM, 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 SUB_MODULE_LED_FLASH, 140 SUB_MODULE_STROBE_FLASH, 141 SUB_MODULE_CSID, 142 SUB_MODULE_CSID_3D, 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 SUB_MODULE_CSIPHY, 145 SUB_MODULE_CSIPHY_3D, 146 SUB_MODULE_MAX, 147 }; 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 enum csid_cfg_type_t { 150 CSID_INIT, 151 CSID_CFG, 152 CSID_RELEASE, 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 }; 155 enum csiphy_cfg_type_t { 156 CSIPHY_INIT, 157 CSIPHY_CFG, 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 CSIPHY_RELEASE, 160 }; 161 enum camera_vreg_type { 162 REG_LDO, 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 REG_VS, 165 REG_GPIO, 166 }; 167 struct msm_sensor_power_setting { 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 enum msm_sensor_power_seq_type_t seq_type; 170 uint16_t seq_val; 171 long config_val; 172 uint16_t delay; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 void *data[10]; 175 }; 176 struct msm_sensor_power_setting_array { 177 struct msm_sensor_power_setting *power_setting; 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 uint16_t size; 180 }; 181 struct msm_sensor_id_info_t { 182 uint16_t sensor_id_reg_addr; 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 uint16_t sensor_id; 185 }; 186 struct msm_camera_sensor_slave_info { 187 uint16_t slave_addr; 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 enum msm_camera_i2c_reg_addr_type addr_type; 190 struct msm_sensor_id_info_t sensor_id_info; 191 struct msm_sensor_power_setting_array power_setting_array; 192 }; 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 struct msm_camera_i2c_reg_array { 195 uint16_t reg_addr; 196 uint16_t reg_data; 197 }; 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 struct msm_camera_i2c_reg_setting { 200 struct msm_camera_i2c_reg_array *reg_setting; 201 uint16_t size; 202 enum msm_camera_i2c_reg_addr_type addr_type; 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 enum msm_camera_i2c_data_type data_type; 205 uint16_t delay; 206 }; 207 struct msm_camera_i2c_seq_reg_array { 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 uint16_t reg_addr; 210 uint8_t reg_data[I2C_SEQ_REG_DATA_MAX]; 211 uint16_t reg_data_size; 212 }; 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 struct msm_camera_i2c_seq_reg_setting { 215 struct msm_camera_i2c_seq_reg_array *reg_setting; 216 uint16_t size; 217 enum msm_camera_i2c_reg_addr_type addr_type; 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 uint16_t delay; 220 }; 221 struct msm_camera_i2c_array_write_config { 222 struct msm_camera_i2c_reg_setting conf_array; 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 uint16_t slave_addr; 225 }; 226 struct msm_camera_i2c_read_config { 227 uint16_t slave_addr; 228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 uint16_t reg_addr; 230 enum msm_camera_i2c_data_type data_type; 231 uint16_t *data; 232 }; 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 struct msm_camera_csid_vc_cfg { 235 uint8_t cid; 236 uint8_t dt; 237 uint8_t decode_format; 238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 }; 240 struct msm_camera_csid_lut_params { 241 uint8_t num_cid; 242 struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID]; 243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 }; 245 struct msm_camera_csid_params { 246 uint8_t lane_cnt; 247 uint16_t lane_assign; 248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 uint8_t phy_sel; 250 struct msm_camera_csid_lut_params lut_params; 251 }; 252 struct msm_camera_csiphy_params { 253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 uint8_t lane_cnt; 255 uint8_t settle_cnt; 256 uint16_t lane_mask; 257 uint8_t combo_mode; 258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 uint8_t csid_core; 260 }; 261 struct msm_camera_csi2_params { 262 struct msm_camera_csid_params csid_params; 263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 struct msm_camera_csiphy_params csiphy_params; 265 }; 266 struct msm_camera_csi_lane_params { 267 uint16_t csi_lane_assign; 268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269 uint16_t csi_lane_mask; 270 }; 271 struct csi_lane_params_t { 272 uint16_t csi_lane_assign; 273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274 uint8_t csi_lane_mask; 275 uint8_t csi_if; 276 uint8_t csid_core[2]; 277 uint8_t csi_phy_sel; 278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 }; 280 struct msm_sensor_info_t { 281 char sensor_name[MAX_SENSOR_NAME]; 282 int32_t session_id; 283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284 int32_t subdev_id[SUB_MODULE_MAX]; 285 }; 286 struct msm_sensor_ois_info_t { 287 char ois_provider[MAX_SENSOR_NAME]; 288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289 int16_t gyro[2]; 290 int16_t target[2]; 291 int16_t hall[2]; 292 uint8_t is_stable; 293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294 }; 295 enum ois_mode_t { 296 OIS_MODE_PREVIEW_CAPTURE, 297 OIS_MODE_VIDEO, 298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 299 OIS_MODE_CAPTURE, 300 OIS_MODE_CENTERING_ONLY, 301 OIS_MODE_CENTERING_OFF 302 }; 303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 304 enum ois_ver_t { 305 OIS_VER_RELEASE, 306 OIS_VER_CALIBRATION, 307 OIS_VER_DEBUG 308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 309 }; 310 struct camera_vreg_t { 311 const char *reg_name; 312 enum camera_vreg_type type; 313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 314 int min_voltage; 315 int max_voltage; 316 int op_mode; 317 uint32_t delay; 318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 319 }; 320 enum camb_position_t { 321 BACK_CAMERA_B, 322 FRONT_CAMERA_B, 323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 324 }; 325 enum camerab_mode_t { 326 CAMERA_MODE_2D_B = (1<<0), 327 CAMERA_MODE_3D_B = (1<<1) 328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 329 }; 330 struct msm_sensor_init_params { 331 int modes_supported; 332 enum camb_position_t position; 333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 334 uint32_t sensor_mount_angle; 335 int ois_supported; 336 }; 337 struct sensorb_cfg_data { 338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 339 int cfgtype; 340 union { 341 struct msm_sensor_info_t sensor_info; 342 struct msm_sensor_init_params sensor_init_params; 343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 344 struct msm_sensor_ois_info_t ois_info; 345 void *setting; 346 } cfg; 347 }; 348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 349 struct csid_cfg_data { 350 enum csid_cfg_type_t cfgtype; 351 union { 352 uint32_t csid_version; 353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 354 struct msm_camera_csid_params *csid_params; 355 } cfg; 356 }; 357 struct csiphy_cfg_data { 358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 359 enum csiphy_cfg_type_t cfgtype; 360 union { 361 struct msm_camera_csiphy_params *csiphy_params; 362 struct msm_camera_csi_lane_params *csi_lane_params; 363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 364 } cfg; 365 }; 366 enum eeprom_cfg_type_t { 367 CFG_EEPROM_GET_INFO, 368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 369 CFG_EEPROM_GET_CAL_DATA, 370 CFG_EEPROM_READ_CAL_DATA, 371 CFG_EEPROM_WRITE_DATA, 372 }; 373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 374 struct eeprom_get_t { 375 uint16_t num_bytes; 376 }; 377 struct eeprom_read_t { 378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 379 uint8_t *dbuffer; 380 uint16_t num_bytes; 381 }; 382 struct eeprom_write_t { 383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 384 uint8_t *dbuffer; 385 uint16_t num_bytes; 386 }; 387 struct msm_eeprom_cfg_data { 388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 389 enum eeprom_cfg_type_t cfgtype; 390 uint8_t is_supported; 391 union { 392 char eeprom_name[MAX_SENSOR_NAME]; 393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 394 struct eeprom_get_t get_data; 395 struct eeprom_read_t read_data; 396 struct eeprom_write_t write_data; 397 } cfg; 398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 399 }; 400 enum msm_sensor_cfg_type_t { 401 CFG_SET_SLAVE_INFO, 402 CFG_SLAVE_READ_I2C, 403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 404 CFG_WRITE_I2C_ARRAY, 405 CFG_SLAVE_WRITE_I2C_ARRAY, 406 CFG_WRITE_I2C_SEQ_ARRAY, 407 CFG_POWER_UP, 408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 409 CFG_POWER_DOWN, 410 CFG_SET_STOP_STREAM_SETTING, 411 CFG_GET_SENSOR_INFO, 412 CFG_GET_SENSOR_INIT_PARAMS, 413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 414 CFG_SET_INIT_SETTING, 415 CFG_SET_RESOLUTION, 416 CFG_SET_STOP_STREAM, 417 CFG_SET_START_STREAM, 418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 419 CFG_OIS_ON, 420 CFG_OIS_OFF, 421 CFG_GET_OIS_INFO, 422 CFG_SET_OIS_MODE, 423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 424 CFG_OIS_MOVE_LENS 425 }; 426 enum msm_actuator_cfg_type_t { 427 CFG_GET_ACTUATOR_INFO, 428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 429 CFG_SET_ACTUATOR_INFO, 430 CFG_SET_DEFAULT_FOCUS, 431 CFG_MOVE_FOCUS, 432 }; 433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 434 enum actuator_type { 435 ACTUATOR_VCM, 436 ACTUATOR_PIEZO, 437 }; 438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 439 enum msm_actuator_data_type { 440 MSM_ACTUATOR_BYTE_DATA = 1, 441 MSM_ACTUATOR_WORD_DATA, 442 }; 443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 444 enum msm_actuator_addr_type { 445 MSM_ACTUATOR_BYTE_ADDR = 1, 446 MSM_ACTUATOR_WORD_ADDR, 447 }; 448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 449 struct reg_settings_t { 450 uint16_t reg_addr; 451 uint16_t reg_data; 452 }; 453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 454 struct region_params_t { 455 uint16_t step_bound[2]; 456 uint16_t code_per_step; 457 }; 458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 459 struct damping_params_t { 460 uint32_t damping_step; 461 uint32_t damping_delay; 462 uint32_t hw_params; 463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 464 }; 465 struct msm_actuator_move_params_t { 466 int8_t dir; 467 int8_t sign_dir; 468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 469 int16_t dest_step_pos; 470 int32_t num_steps; 471 int32_t num_steps_inf_pos; 472 struct damping_params_t *ringing_params; 473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 474 }; 475 struct msm_actuator_tuning_params_t { 476 int16_t initial_code; 477 uint16_t pwd_step; 478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 479 uint16_t region_size; 480 uint32_t total_steps; 481 struct region_params_t *region_params; 482 }; 483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 484 struct msm_actuator_params_t { 485 enum actuator_type act_type; 486 uint8_t reg_tbl_size; 487 uint16_t data_size; 488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 489 uint16_t init_setting_size; 490 uint32_t i2c_addr; 491 enum msm_actuator_addr_type i2c_addr_type; 492 enum msm_actuator_data_type i2c_data_type; 493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 494 struct msm_actuator_reg_params_t *reg_tbl_params; 495 struct reg_settings_t *init_settings; 496 }; 497 struct msm_actuator_set_info_t { 498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 499 struct msm_actuator_params_t actuator_params; 500 struct msm_actuator_tuning_params_t af_tuning_params; 501 }; 502 struct msm_actuator_get_info_t { 503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 504 uint32_t focal_length_num; 505 uint32_t focal_length_den; 506 uint32_t f_number_num; 507 uint32_t f_number_den; 508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 509 uint32_t f_pix_num; 510 uint32_t f_pix_den; 511 uint32_t total_f_dist_num; 512 uint32_t total_f_dist_den; 513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 514 uint32_t hor_view_angle_num; 515 uint32_t hor_view_angle_den; 516 uint32_t ver_view_angle_num; 517 uint32_t ver_view_angle_den; 518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 519 }; 520 enum af_camera_name { 521 ACTUATOR_MAIN_CAM_0, 522 ACTUATOR_MAIN_CAM_1, 523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 524 ACTUATOR_MAIN_CAM_2, 525 ACTUATOR_MAIN_CAM_3, 526 ACTUATOR_MAIN_CAM_4, 527 ACTUATOR_MAIN_CAM_5, 528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 529 ACTUATOR_WEB_CAM_0, 530 ACTUATOR_WEB_CAM_1, 531 ACTUATOR_WEB_CAM_2, 532 }; 533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 534 struct msm_actuator_cfg_data { 535 int cfgtype; 536 uint8_t is_af_supported; 537 union { 538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 539 struct msm_actuator_move_params_t move; 540 struct msm_actuator_set_info_t set_info; 541 struct msm_actuator_get_info_t get_info; 542 enum af_camera_name cam_name; 543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 544 } cfg; 545 }; 546 enum msm_actuator_write_type { 547 MSM_ACTUATOR_WRITE_HW_DAMP, 548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 549 MSM_ACTUATOR_WRITE_DAC, 550 }; 551 struct msm_actuator_reg_params_t { 552 enum msm_actuator_write_type reg_write_type; 553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 554 uint32_t hw_mask; 555 uint16_t reg_addr; 556 uint16_t hw_shift; 557 uint16_t data_shift; 558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 559 }; 560 enum msm_camera_led_config_t { 561 MSM_CAMERA_LED_OFF, 562 MSM_CAMERA_LED_LOW, 563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 564 MSM_CAMERA_LED_HIGH, 565 MSM_CAMERA_LED_INIT, 566 MSM_CAMERA_LED_RELEASE, 567 }; 568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 569 struct msm_camera_led_cfg_t { 570 enum msm_camera_led_config_t cfgtype; 571 }; 572 #define VIDIOC_MSM_SENSOR_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data) 573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 574 #define VIDIOC_MSM_SENSOR_RELEASE _IO('V', BASE_VIDIOC_PRIVATE + 2) 575 #define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID _IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t) 576 #define VIDIOC_MSM_CSIPHY_IO_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csid_cfg_data) 577 #define VIDIOC_MSM_CSID_IO_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csiphy_cfg_data) 578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 579 #define VIDIOC_MSM_ACTUATOR_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data) 580 #define VIDIOC_MSM_FLASH_LED_DATA_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t) 581 #define VIDIOC_MSM_EEPROM_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data) 582 #define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') 583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 584 #endif 585 586