diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2019-08-21 03:52:23 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-05-01 18:21:38 +0300 |
commit | 1dd5f47b1e983cdcaf64ec0be99c832c34227d99 (patch) | |
tree | bbca0ccdd058be0adfacbb7071d56718b8d17b1d /include | |
parent | 42830b8d90baae70ce2c0f4e2b181794e46cbac0 (diff) |
msm: camera_v2: Import xiaomi longcheer changes
* Cleaned up by removing KERNEL_CUSTOM_FACTORY and KERNEL_CUSTOM_F7A references
* Also updated ifdefs to new device configs
Change-Id: Ied3e6b342e448f3835b5a61101fc5fc23367f197
Signed-off-by: Isaac Chen <tingyi364@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/msm_cam_sensor.h | 4 | ||||
-rw-r--r-- | include/soc/qcom/camera2.h | 47 | ||||
-rw-r--r-- | include/uapi/media/msm_camsensor_sdk.h | 30 |
3 files changed, 81 insertions, 0 deletions
diff --git a/include/media/msm_cam_sensor.h b/include/media/msm_cam_sensor.h index 2c8b651147e0..3f7d1ee1e7b0 100644 --- a/include/media/msm_cam_sensor.h +++ b/include/media/msm_cam_sensor.h @@ -37,6 +37,10 @@ struct msm_camera_sensor_slave_info32 { enum i2c_freq_mode_t i2c_freq_mode; enum msm_camera_i2c_reg_addr_type addr_type; struct msm_sensor_id_info_t sensor_id_info; +#ifdef CONFIG_MACH_LONGCHEER + struct msm_vendor_id_info_t vendor_id_info; + struct msm_vcm_id_info_t vcm_id_info; +#endif struct msm_sensor_power_setting_array32 power_setting_array; uint8_t is_init_params_valid; struct msm_sensor_init_params sensor_init_params; diff --git a/include/soc/qcom/camera2.h b/include/soc/qcom/camera2.h index 5a61d2b372c3..e6327a532c2e 100644 --- a/include/soc/qcom/camera2.h +++ b/include/soc/qcom/camera2.h @@ -20,6 +20,49 @@ #include <linux/of_device.h> #include <linux/of.h> +#ifdef CONFIG_MACH_LONGCHEER +enum __camera_vendor_module_id { + MID_NULL = 0, + MID_SUNNY, + MID_TRULY, + MID_A_KERR, + MID_LITEARRAY, + MID_DARLING, + MID_QTECH, + MID_OFILM, + MID_HUAQUAN, + MID_KINGCOM = MID_HUAQUAN, + MID_BOOYI, + MID_LAIMU, + MID_E7S = 21, + MID_WDSEN, + MID_SUNRISE, + MID_PRIMAX = 0x17, + MID_MAX +}; +typedef enum __camera_vendor_module_id camera_vendor_module_id; + +enum camera_sensor_id { + SENSOR_NULL = 0, + SENSOR_S5K5E8 = 0x09, + SENSOR_MAX +}; + +enum camera_product_id { + PRODUCT_NULL = 0, + PRODUCT_E7S = 0x15, + PRODUCT_D2S = 0x17, + PRODUCT_MAX +}; + +struct vendor_eeprom { + char eeprom_name[128]; + uint8_t module_id; +}; + +#define CAMERA_VENDOR_EEPROM_COUNT_MAX 14 +#endif + #define MAX_SPECIAL_SUPPORT_SIZE 10 enum msm_camera_device_type_t { @@ -152,6 +195,10 @@ struct msm_camera_sensor_board_info { const char *special_support_sensors[MAX_SPECIAL_SUPPORT_SIZE]; int32_t special_support_size; struct msm_camera_slave_info *slave_info; +#ifdef CONFIG_MACH_LONGCHEER + struct msm_vendor_id_info_t *vendor_id_info; + struct msm_vcm_id_info_t *vcm_id_info; +#endif struct msm_camera_csi_lane_params *csi_lane_params; struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; struct msm_actuator_info *actuator_info; diff --git a/include/uapi/media/msm_camsensor_sdk.h b/include/uapi/media/msm_camsensor_sdk.h index 40731a927ce5..9c7c032210a0 100644 --- a/include/uapi/media/msm_camsensor_sdk.h +++ b/include/uapi/media/msm_camsensor_sdk.h @@ -301,6 +301,32 @@ struct msm_sensor_id_info_t { unsigned short sensor_id_mask; }; +#ifdef CONFIG_MACH_LONGCHEER +enum msm_cci_i2c_master_t { + MSM_MASTER_0, + MSM_MASTER_1, + MSM_MASTER_MAX, +}; + +struct msm_vendor_id_info_t { + unsigned short eeprom_slave_addr; + unsigned short vendor_id_addr; + enum msm_camera_i2c_reg_addr_type addr_type; + unsigned short vendor_id; + enum msm_camera_i2c_data_type data_type; + enum msm_cci_i2c_master_t cci_i2c_master; +}; + +struct msm_vcm_id_info_t { + unsigned short eeprom_slave_addr; + unsigned short vcm_id_addr; + enum msm_camera_i2c_reg_addr_type addr_type; + unsigned short vcm_id; + enum msm_camera_i2c_data_type data_type; + enum msm_cci_i2c_master_t cci_i2c_master; +}; +#endif + struct msm_camera_sensor_slave_info { char sensor_name[32]; char eeprom_name[32]; @@ -312,6 +338,10 @@ struct msm_camera_sensor_slave_info { enum i2c_freq_mode_t i2c_freq_mode; enum msm_camera_i2c_reg_addr_type addr_type; struct msm_sensor_id_info_t sensor_id_info; +#ifdef CONFIG_MACH_LONGCHEER + struct msm_vendor_id_info_t vendor_id_info; + struct msm_vcm_id_info_t vcm_id_info; +#endif struct msm_sensor_power_setting_array power_setting_array; unsigned char is_init_params_valid; struct msm_sensor_init_params sensor_init_params; |