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

Commit 902d372b authored by Wei Ding's avatar Wei Ding
Browse files

msm: msm8916: camera: Add parse gpio-af-pwdm propery



The VCM of QRD msm8916 is controlled by gpio, parse
gpio-af-pwdm property function is needed.

Change-Id: Ie6558e0424441434d2dc435a4d44e3b67fcad5bf
Signed-off-by: default avatarWei Ding <weiding@codeaurora.org>
parent 6ddb099c
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -811,6 +811,25 @@ int msm_camera_init_gpio_pin_tbl(struct device_node *of_node,
			gconf->gpio_num_info->gpio_num[SENSOR_GPIO_STANDBY]);
	}

	rc = of_property_read_u32(of_node, "qcom,gpio-af-pwdm", &val);
	if (rc != -EINVAL) {
		if (rc < 0) {
			pr_err("%s:%d read qcom,gpio-af-pwdm failed rc %d\n",
				__func__, __LINE__, rc);
			goto ERROR;
		} else if (val >= gpio_array_size) {
			pr_err("%s:%d qcom,gpio-af-pwdm invalid %d\n",
				__func__, __LINE__, val);
			rc = -EINVAL;
			goto ERROR;
		}
		gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM] =
			gpio_array[val];
		gconf->gpio_num_info->valid[SENSOR_GPIO_AF_PWDM] = 1;
		CDBG("%s qcom,gpio-af-pwdm %d\n", __func__,
			gconf->gpio_num_info->gpio_num[SENSOR_GPIO_AF_PWDM]);
	}

	if (of_property_read_bool(of_node, "qcom,gpio-flash-en") == true) {
		rc = of_property_read_u32(of_node, "qcom,gpio-flash-en", &val);
		if (rc < 0) {