Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b01a34ec authored by Vivek Veenam's avatar Vivek Veenam Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVivek Veenam <vveenam@codeaurora.org>
parent 03ffbf10
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -166,6 +166,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 MSM ACTUATOR

+16 −0
Original line number Diff line number Diff line
@@ -282,6 +282,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__,
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ enum sensor_sub_module_t {
	SUB_MODULE_CSIPHY_3D,
	SUB_MODULE_OIS,
	SUB_MODULE_EXT,
	SUB_MODULE_IR_LED,
	SUB_MODULE_MAX,
};