Loading Documentation/devicetree/bindings/media/video/msm-eeprom.txt +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ Optional properties: - cam_vdig-supply : should contain regulator to be used for the digital vdd. - qcom,saddr%d : property should specify the slave address for block (%d). - qcom,i2c-freq-mode : property should specify the I2C speed mode. - qcom,gpio-custom1 : should specify the custom non standard gpio1 index. - qcom,gpio-custom2 : should specify the custom non standard gpio2 index. Optional properties -EEPROM Camera Multimodule - qcom,cmm-data-support - Camera MultiModule data capability flag. Loading drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c +46 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,10 @@ int msm_camera_get_dt_power_setting_data(struct device_node *of_node, ps[i].seq_val = SENSOR_GPIO_VAF; else if (!strcmp(seq_name, "sensor_gpio_vio")) ps[i].seq_val = SENSOR_GPIO_VIO; else if (!strcmp(seq_name, "sensor_gpio_custom1")) ps[i].seq_val = SENSOR_GPIO_CUSTOM1; else if (!strcmp(seq_name, "sensor_gpio_custom2")) ps[i].seq_val = SENSOR_GPIO_CUSTOM2; else rc = -EILSEQ; break; Loading Loading @@ -964,6 +968,48 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, } else rc = 0; rc = of_property_read_u32(of_node, "qcom,gpio-custom1", &val); if (rc != -EINVAL) { if (rc < 0) { pr_err("%s:%d read qcom,gpio-custom1 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { pr_err("%s:%d qcom,gpio-custom1 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1] = gpio_array[val]; gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM1] = 1; CDBG("%s qcom,gpio-custom1 %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1]); } else { rc = 0; } rc = of_property_read_u32(of_node, "qcom,gpio-custom2", &val); if (rc != -EINVAL) { if (rc < 0) { pr_err("%s:%d read qcom,gpio-custom2 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { pr_err("%s:%d qcom,gpio-custom2 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2] = gpio_array[val]; gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM2] = 1; CDBG("%s qcom,gpio-custom2 %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2]); } else { rc = 0; } return rc; ERROR: Loading include/media/msm_camsensor_sdk.h +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ enum msm_sensor_power_seq_gpio_t { SENSOR_GPIO_FL_EN, SENSOR_GPIO_FL_NOW, SENSOR_GPIO_FL_RESET, SENSOR_GPIO_CUSTOM1, SENSOR_GPIO_CUSTOM2, SENSOR_GPIO_MAX, }; Loading include/soc/qcom/camera2.h +2 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,8 @@ struct v4l2_subdev_info { }; struct msm_camera_gpio_num_info { uint16_t gpio_num[10]; uint8_t valid[10]; uint16_t gpio_num[SENSOR_GPIO_MAX]; uint8_t valid[SENSOR_GPIO_MAX]; }; struct msm_camera_gpio_conf { Loading Loading
Documentation/devicetree/bindings/media/video/msm-eeprom.txt +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ Optional properties: - cam_vdig-supply : should contain regulator to be used for the digital vdd. - qcom,saddr%d : property should specify the slave address for block (%d). - qcom,i2c-freq-mode : property should specify the I2C speed mode. - qcom,gpio-custom1 : should specify the custom non standard gpio1 index. - qcom,gpio-custom2 : should specify the custom non standard gpio2 index. Optional properties -EEPROM Camera Multimodule - qcom,cmm-data-support - Camera MultiModule data capability flag. Loading
drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c +46 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,10 @@ int msm_camera_get_dt_power_setting_data(struct device_node *of_node, ps[i].seq_val = SENSOR_GPIO_VAF; else if (!strcmp(seq_name, "sensor_gpio_vio")) ps[i].seq_val = SENSOR_GPIO_VIO; else if (!strcmp(seq_name, "sensor_gpio_custom1")) ps[i].seq_val = SENSOR_GPIO_CUSTOM1; else if (!strcmp(seq_name, "sensor_gpio_custom2")) ps[i].seq_val = SENSOR_GPIO_CUSTOM2; else rc = -EILSEQ; break; Loading Loading @@ -964,6 +968,48 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node, } else rc = 0; rc = of_property_read_u32(of_node, "qcom,gpio-custom1", &val); if (rc != -EINVAL) { if (rc < 0) { pr_err("%s:%d read qcom,gpio-custom1 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { pr_err("%s:%d qcom,gpio-custom1 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1] = gpio_array[val]; gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM1] = 1; CDBG("%s qcom,gpio-custom1 %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM1]); } else { rc = 0; } rc = of_property_read_u32(of_node, "qcom,gpio-custom2", &val); if (rc != -EINVAL) { if (rc < 0) { pr_err("%s:%d read qcom,gpio-custom2 failed rc %d\n", __func__, __LINE__, rc); goto ERROR; } else if (val >= gpio_array_size) { pr_err("%s:%d qcom,gpio-custom2 invalid %d\n", __func__, __LINE__, val); rc = -EINVAL; goto ERROR; } gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2] = gpio_array[val]; gconf->gpio_num_info->valid[SENSOR_GPIO_CUSTOM2] = 1; CDBG("%s qcom,gpio-custom2 %d\n", __func__, gconf->gpio_num_info->gpio_num[SENSOR_GPIO_CUSTOM2]); } else { rc = 0; } return rc; ERROR: Loading
include/media/msm_camsensor_sdk.h +2 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ enum msm_sensor_power_seq_gpio_t { SENSOR_GPIO_FL_EN, SENSOR_GPIO_FL_NOW, SENSOR_GPIO_FL_RESET, SENSOR_GPIO_CUSTOM1, SENSOR_GPIO_CUSTOM2, SENSOR_GPIO_MAX, }; Loading
include/soc/qcom/camera2.h +2 −2 Original line number Diff line number Diff line Loading @@ -74,8 +74,8 @@ struct v4l2_subdev_info { }; struct msm_camera_gpio_num_info { uint16_t gpio_num[10]; uint8_t valid[10]; uint16_t gpio_num[SENSOR_GPIO_MAX]; uint8_t valid[SENSOR_GPIO_MAX]; }; struct msm_camera_gpio_conf { Loading