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_CAMSENSOR_SDK_H 20#define __LINUX_MSM_CAMSENSOR_SDK_H 21#define KVERSION 0x1 22#define MAX_POWER_CONFIG 12 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define GPIO_OUT_LOW (0 << 1) 25#define GPIO_OUT_HIGH (1 << 1) 26#define CSI_EMBED_DATA 0x12 27#define CSI_RESERVED_DATA_0 0x13 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define CSI_YUV422_8 0x1E 30#define CSI_RAW8 0x2A 31#define CSI_RAW10 0x2B 32#define CSI_RAW12 0x2C 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define CSI_DECODE_6BIT 0 35#define CSI_DECODE_8BIT 1 36#define CSI_DECODE_10BIT 2 37#define CSI_DECODE_DPCM_10_8_10 5 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define MAX_CID 16 40#define I2C_SEQ_REG_DATA_MAX 256 41#define I2C_REG_DATA_MAX (8 * 1024) 42#define MAX_ACTUATOR_REG_TBL_SIZE 8 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44#define MAX_ACTUATOR_REGION 5 45#define NUM_ACTUATOR_DIR 2 46#define MAX_ACTUATOR_SCENARIO 8 47#define MAX_ACT_MOD_NAME_SIZE 32 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49#define MAX_ACT_NAME_SIZE 32 50#define MAX_ACTUATOR_INIT_SET 120 51#define MAX_I2C_REG_SET 12 52#define MAX_NAME_SIZE 32 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54#define MAX_LED_TRIGGERS 3 55enum msm_sensor_camera_id_t { 56 CAMERA_0, 57 CAMERA_1, 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 CAMERA_2, 60 CAMERA_3, 61 MAX_CAMERAS, 62}; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64enum i2c_freq_mode_t { 65 I2C_STANDARD_MODE, 66 I2C_FAST_MODE, 67 I2C_CUSTOM_MODE, 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 I2C_FAST_PLUS_MODE, 70 I2C_MAX_MODES, 71}; 72enum camb_position_t { 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 BACK_CAMERA_B, 75 FRONT_CAMERA_B, 76 INVALID_CAMERA_B, 77}; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79enum msm_sensor_power_seq_type_t { 80 SENSOR_CLK, 81 SENSOR_GPIO, 82 SENSOR_VREG, 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 SENSOR_I2C_MUX, 85 SENSOR_I2C, 86}; 87enum msm_camera_i2c_reg_addr_type { 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 MSM_CAMERA_I2C_BYTE_ADDR = 1, 90 MSM_CAMERA_I2C_WORD_ADDR, 91 MSM_CAMERA_I2C_3B_ADDR, 92 MSM_CAMERA_I2C_ADDR_TYPE_MAX, 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94}; 95enum msm_camera_i2c_data_type { 96 MSM_CAMERA_I2C_BYTE_DATA = 1, 97 MSM_CAMERA_I2C_WORD_DATA, 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 MSM_CAMERA_I2C_DWORD_DATA, 100 MSM_CAMERA_I2C_SET_BYTE_MASK, 101 MSM_CAMERA_I2C_UNSET_BYTE_MASK, 102 MSM_CAMERA_I2C_SET_WORD_MASK, 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 MSM_CAMERA_I2C_UNSET_WORD_MASK, 105 MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA, 106 MSM_CAMERA_I2C_DATA_TYPE_MAX, 107}; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109enum msm_sensor_power_seq_gpio_t { 110 SENSOR_GPIO_RESET, 111 SENSOR_GPIO_STANDBY, 112 SENSOR_GPIO_AF_PWDM, 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 SENSOR_GPIO_VIO, 115 SENSOR_GPIO_VANA, 116 SENSOR_GPIO_VDIG, 117 SENSOR_GPIO_VAF, 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 SENSOR_GPIO_FL_EN, 120 SENSOR_GPIO_FL_NOW, 121 SENSOR_GPIO_FL_RESET, 122 SENSOR_GPIO_CUSTOM1, 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 SENSOR_GPIO_CUSTOM2, 125 SENSOR_GPIO_MAX, 126}; 127enum msm_camera_vreg_name_t { 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 CAM_VDIG, 130 CAM_VIO, 131 CAM_VANA, 132 CAM_VAF, 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 CAM_V_CUSTOM1, 135 CAM_V_CUSTOM2, 136 CAM_VREG_MAX, 137}; 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139enum msm_sensor_clk_type_t { 140 SENSOR_CAM_MCLK, 141 SENSOR_CAM_CLK, 142 SENSOR_CAM_CLK_MAX, 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144}; 145enum camerab_mode_t { 146 CAMERA_MODE_2D_B = (1 << 0), 147 CAMERA_MODE_3D_B = (1 << 1), 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 CAMERA_MODE_INVALID = (1 << 2), 150}; 151enum sensor_stats_type { 152 YRGB, 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 YYYY, 155}; 156enum msm_actuator_data_type { 157 MSM_ACTUATOR_BYTE_DATA = 1, 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 MSM_ACTUATOR_WORD_DATA, 160}; 161enum msm_actuator_addr_type { 162 MSM_ACTUATOR_BYTE_ADDR = 1, 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 MSM_ACTUATOR_WORD_ADDR, 165}; 166enum msm_actuator_write_type { 167 MSM_ACTUATOR_WRITE_HW_DAMP, 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 MSM_ACTUATOR_WRITE_DAC, 170 MSM_ACTUATOR_WRITE, 171 MSM_ACTUATOR_WRITE_DIR_REG, 172 MSM_ACTUATOR_POLL, 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 MSM_ACTUATOR_READ_WRITE, 175}; 176enum msm_actuator_i2c_operation { 177 MSM_ACT_WRITE = 0, 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 MSM_ACT_POLL, 180}; 181enum actuator_type { 182 ACTUATOR_VCM, 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 ACTUATOR_PIEZO, 185 ACTUATOR_HVCM, 186 ACTUATOR_BIVCM, 187}; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189enum msm_flash_driver_type { 190 FLASH_DRIVER_PMIC, 191 FLASH_DRIVER_I2C, 192 FLASH_DRIVER_GPIO, 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 FLASH_DRIVER_DEFAULT 195}; 196enum msm_flash_cfg_type_t { 197 CFG_FLASH_INIT, 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 CFG_FLASH_RELEASE, 200 CFG_FLASH_OFF, 201 CFG_FLASH_LOW, 202 CFG_FLASH_HIGH, 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204}; 205struct msm_sensor_power_setting { 206 enum msm_sensor_power_seq_type_t seq_type; 207 unsigned short seq_val; 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 long config_val; 210 unsigned short delay; 211 void * data[10]; 212}; 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214struct msm_sensor_power_setting_array { 215 struct msm_sensor_power_setting power_setting_a[MAX_POWER_CONFIG]; 216 struct msm_sensor_power_setting * power_setting; 217 unsigned short size; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 struct msm_sensor_power_setting power_down_setting_a[MAX_POWER_CONFIG]; 220 struct msm_sensor_power_setting * power_down_setting; 221 unsigned short size_down; 222}; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224struct msm_sensor_init_params { 225 int modes_supported; 226 enum camb_position_t position; 227 unsigned int sensor_mount_angle; 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229}; 230struct msm_sensor_id_info_t { 231 unsigned short sensor_id_reg_addr; 232 unsigned short sensor_id; 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 unsigned short sensor_id_mask; 235 unsigned short camera_id_pin; 236}; 237struct msm_camera_sensor_slave_info { 238 char sensor_name[32]; 239/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 240 char eeprom_name[32]; 241 char actuator_name[32]; 242 char ois_name[32]; 243 char flash_name[32]; 244/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 245 enum msm_sensor_camera_id_t camera_id; 246 unsigned short slave_addr; 247 enum i2c_freq_mode_t i2c_freq_mode; 248 enum msm_camera_i2c_reg_addr_type addr_type; 249/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 250 struct msm_sensor_id_info_t sensor_id_info; 251 struct msm_sensor_power_setting_array power_setting_array; 252 unsigned char is_init_params_valid; 253 struct msm_sensor_init_params sensor_init_params; 254/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 255 unsigned char is_flash_supported; 256}; 257struct msm_camera_i2c_reg_array { 258 unsigned short reg_addr; 259/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 260 unsigned short reg_data; 261 unsigned int delay; 262}; 263struct msm_camera_i2c_reg_setting { 264/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 265 struct msm_camera_i2c_reg_array * reg_setting; 266 unsigned short size; 267 enum msm_camera_i2c_reg_addr_type addr_type; 268 enum msm_camera_i2c_data_type data_type; 269/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 270 unsigned short delay; 271}; 272struct msm_camera_csid_vc_cfg { 273 unsigned char cid; 274/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 275 unsigned char dt; 276 unsigned char decode_format; 277}; 278struct msm_camera_csid_lut_params { 279/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 280 unsigned char num_cid; 281 struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID]; 282 struct msm_camera_csid_vc_cfg * vc_cfg[MAX_CID]; 283}; 284/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 285struct msm_camera_csid_params { 286 unsigned char lane_cnt; 287 unsigned short lane_assign; 288 unsigned char phy_sel; 289/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 290 unsigned int csi_clk; 291 struct msm_camera_csid_lut_params lut_params; 292}; 293struct msm_camera_csiphy_params { 294/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 295 unsigned char lane_cnt; 296 unsigned char settle_cnt; 297 unsigned short lane_mask; 298 unsigned char combo_mode; 299/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 300 unsigned char csid_core; 301 unsigned int csiphy_clk; 302}; 303struct msm_camera_i2c_seq_reg_array { 304/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 305 unsigned short reg_addr; 306 unsigned char reg_data[I2C_SEQ_REG_DATA_MAX]; 307 unsigned short reg_data_size; 308}; 309/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 310struct msm_camera_i2c_seq_reg_setting { 311 struct msm_camera_i2c_seq_reg_array * reg_setting; 312 unsigned short size; 313 enum msm_camera_i2c_reg_addr_type addr_type; 314/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 315 unsigned short delay; 316}; 317struct msm_actuator_reg_params_t { 318 enum msm_actuator_write_type reg_write_type; 319/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 320 unsigned int hw_mask; 321 unsigned short reg_addr; 322 unsigned short hw_shift; 323 unsigned short data_shift; 324/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 325 unsigned short data_type; 326 unsigned short addr_type; 327 unsigned short reg_data; 328 unsigned short delay; 329/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 330}; 331struct damping_params_t { 332 unsigned int damping_step; 333 unsigned int damping_delay; 334/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 335 unsigned int hw_params; 336}; 337struct region_params_t { 338 unsigned short step_bound[2]; 339/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 340 unsigned short code_per_step; 341 unsigned int qvalue; 342}; 343struct reg_settings_t { 344/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 345 unsigned short reg_addr; 346 enum msm_actuator_addr_type addr_type; 347 unsigned short reg_data; 348 enum msm_actuator_data_type data_type; 349/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 350 enum msm_actuator_i2c_operation i2c_operation; 351 unsigned int delay; 352}; 353struct msm_camera_i2c_reg_setting_array { 354/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 355 struct msm_camera_i2c_reg_array reg_setting_a[MAX_I2C_REG_SET]; 356 unsigned short size; 357 enum msm_camera_i2c_reg_addr_type addr_type; 358 enum msm_camera_i2c_data_type data_type; 359/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 360 unsigned short delay; 361}; 362#endif 363 364