diff options
| author | Vivek Veenam <vveenam@codeaurora.org> | 2016-06-23 23:44:42 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-11 23:22:04 -0700 |
| commit | 049259bcda9bfd5e6ab3c253c71fd094b99cd2ad (patch) | |
| tree | 976c80b6dc5de5bc85780072da58b34b66906382 | |
| parent | 911e592fdc0d6c8f63ea2aec181122a5621d4cee (diff) | |
msm: camera: Export IR LED device to mm-qcamera-daemon
Extend sensor_info structure with one more field to be able to export the
LED IR device to mm-qcamera-daemon.
Change-Id: Ibb8afffdc1e4780a48d085918cb6d6cf84cc0dba
Signed-off-by: Vivek Veenam <vveenam@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/media/video/msm-cci.txt | 2 | ||||
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c | 16 | ||||
| -rw-r--r-- | include/uapi/media/msm_cam_sensor.h | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/media/video/msm-cci.txt b/Documentation/devicetree/bindings/media/video/msm-cci.txt index fb1ca0261f9c..6f5a7d6363f7 100644 --- a/Documentation/devicetree/bindings/media/video/msm-cci.txt +++ b/Documentation/devicetree/bindings/media/video/msm-cci.txt @@ -168,6 +168,8 @@ Optional properties: property should contain phandle of respective eeprom nodes - qcom,ois-src : if optical image stabilization is supported by this sensor, this property should contain phandle of respective ois node +- qcom,ir-led-src : if ir led is supported by this sensor, this property + should contain phandle of respective ir-led node * Qualcomm Technologies, Inc. MSM ACTUATOR diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c index 6b867bfb5c4a..bc21aa2206b5 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_dt_util.c @@ -270,6 +270,22 @@ int msm_sensor_get_sub_module_index(struct device_node *of_node, src_node = NULL; } + src_node = of_parse_phandle(of_node, "qcom,ir-led-src", 0); + if (!src_node) { + CDBG("%s:%d src_node NULL\n", __func__, __LINE__); + } else { + rc = of_property_read_u32(src_node, "cell-index", &val); + CDBG("%s qcom,ir led cell index %d, rc %d\n", __func__, + val, rc); + if (rc < 0) { + pr_err("%s:%d failed %d\n", __func__, __LINE__, rc); + goto ERROR; + } + sensor_info->subdev_id[SUB_MODULE_IR_LED] = val; + of_node_put(src_node); + src_node = NULL; + } + rc = of_property_read_u32(of_node, "qcom,strobe-flash-sd-index", &val); if (rc != -EINVAL) { CDBG("%s qcom,strobe-flash-sd-index %d, rc %d\n", __func__, diff --git a/include/uapi/media/msm_cam_sensor.h b/include/uapi/media/msm_cam_sensor.h index 2c7ada5d02cf..539ebb966c61 100644 --- a/include/uapi/media/msm_cam_sensor.h +++ b/include/uapi/media/msm_cam_sensor.h @@ -86,6 +86,7 @@ enum sensor_sub_module_t { SUB_MODULE_CSIPHY_3D, SUB_MODULE_OIS, SUB_MODULE_EXT, + SUB_MODULE_IR_LED, SUB_MODULE_MAX, }; |
