msm_cam_sensor.h 14 KB

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