diff options
| author | Vivek Veenam <vveenam@codeaurora.org> | 2016-06-24 00:07:47 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-16 10:30:35 -0700 |
| commit | b53eb89873b9fb238b43036ea46010642013ad83 (patch) | |
| tree | 29378e7e5b284ad0d0ec3205d8dc1684be4763d1 | |
| parent | 049259bcda9bfd5e6ab3c253c71fd094b99cd2ad (diff) | |
msm: camera: Export IR CUT device to mm-qcamera-daemon
Extend sensor_info structure with one more field to be able to export
the IR CUT device to mm-qcamera-daemon.
Change-Id: I63da161f90bce2c33d1e7e9d5822c8635e307fd5
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 6f5a7d6363f7..991c6d4ec255 100644 --- a/Documentation/devicetree/bindings/media/video/msm-cci.txt +++ b/Documentation/devicetree/bindings/media/video/msm-cci.txt @@ -170,6 +170,8 @@ Optional properties: 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 +- qcom,ir-cut-src : if ir cut is supported by this sensor, this property + should contain phandle of respective ir-cut 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 bc21aa2206b5..ecb694d74f8e 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 @@ -286,6 +286,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-cut-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 cut 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_CUT] = 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 539ebb966c61..5c4a436068e1 100644 --- a/include/uapi/media/msm_cam_sensor.h +++ b/include/uapi/media/msm_cam_sensor.h @@ -87,6 +87,7 @@ enum sensor_sub_module_t { SUB_MODULE_OIS, SUB_MODULE_EXT, SUB_MODULE_IR_LED, + SUB_MODULE_IR_CUT, SUB_MODULE_MAX, }; |
