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

Commit 8f42dfda authored by Evgeniy Borisov's avatar Evgeniy Borisov Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: sensor: Remove "qcom,cam-vreg-type" property



This sensor property isn't needed. We able to check for
this information runtime.

Change-Id: Iec142a4f467f7e695cdb68a09e998b2351afa6ec
Signed-off-by: default avatarEvgeniy Borisov <eborisov@codeaurora.org>
parent f98fc1b2
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -76,9 +76,6 @@ Required properties:
- qcom,cam-vreg-name : should contain names of all regulators needed by this
    sensor
    - "cam_vdig", "cam_vana", "cam_vio", "cam_vaf"
- qcom,cam-vreg-type : should contain regulator type for regulators mentioned in
    qcom,cam-vreg-name property (in the same order)
    - 0 for LDO and 1 for LVS
- qcom,cam-vreg-min-voltage : should contain minimum voltage level for
    regulators mentioned in qcom,cam-vreg-name property (in the same order)
- qcom,cam-vreg-max-voltage : should contain maximum voltage level for
@@ -181,9 +178,6 @@ Optional properties:
- qcom,cam-vreg-name : should contain names of all regulators needed by this
    actuator
    - "cam_vaf"
- qcom,cam-vreg-type : should contain regulator type for regulators mentioned in
    qcom,cam-vreg-name property (in the same order)
    - 0 for LDO and 1 for LVS
- qcom,cam-vreg-min-voltage : should contain minimum voltage level in mcrovolts
   for regulators mentioned in qcom,cam-vreg-name property (in the same order)
- qcom,cam-vreg-max-voltage : should contain maximum voltage level in mcrovolts
@@ -233,7 +227,6 @@ Example:
		qcom,cci-master = <0>;
		cam_vaf-supply = <&pm8941_l23>;
		qcom,cam-vreg-name = "cam_vaf";
		qcom,cam-vreg-type = <0>;
		qcom,cam-vreg-min-voltage = <3000000>;
		qcom,cam-vreg-max-voltage = <3000000>;
		qcom,cam-vreg-op-mode = <100000>;
@@ -257,7 +250,6 @@ Example:
               cam_vio-supply = <&pm8941_lvs3>;
               cam_vaf-supply = <&pm8941_l23>;
               qcom,cam-vreg-name = "cam_vdig", "cam_vana", "cam_vio", "cam_vaf";
               qcom,cam-vreg-type = <0 0 1 0>;
               qcom,cam-vreg-min-voltage = <1225000 2850000 0 3000000>;
               qcom,cam-vreg-max-voltage = <1225000 2850000 0 3000000>;
               qcom,cam-vreg-op-mode = <105000 80000 0 100000>;
+2 −2
Original line number Diff line number Diff line
@@ -51,11 +51,11 @@ static struct msm_cam_clk_info csid_clk_info[CSID_NUM_CLK_MAX];
static struct msm_cam_clk_info csid_clk_src_info[CSID_NUM_CLK_MAX];

static struct camera_vreg_t csid_vreg_info[] = {
	{"qcom,mipi-csi-vdd", REG_LDO, 0, 0, 12000},
	{"qcom,mipi-csi-vdd", 0, 0, 12000},
};

static struct camera_vreg_t csid_8960_vreg_info[] = {
	{"mipi_csi_vdd", REG_LDO, 1200000, 1200000, 20000},
	{"mipi_csi_vdd", 1200000, 1200000, 20000},
};
#ifdef CONFIG_COMPAT
static struct v4l2_file_operations msm_csid_v4l2_subdev_fops;
+0 −12
Original line number Diff line number Diff line
@@ -916,18 +916,6 @@ int msm_camera_get_dt_vreg_data(struct device_node *of_node,
		goto ERROR1;
	}

	rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-type",
		vreg_array, count);
	if (rc < 0) {
		pr_err("%s failed %d\n", __func__, __LINE__);
		goto ERROR2;
	}
	for (i = 0; i < count; i++) {
		vreg[i].type = vreg_array[i];
		CDBG("%s cam_vreg[%d].type = %d\n", __func__, i,
			vreg[i].type);
	}

	rc = of_property_read_u32_array(of_node, "qcom,cam-vreg-min-voltage",
		vreg_array, count);
	if (rc < 0) {
+8 −8
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
				reg_ptr[j] = NULL;
				goto vreg_get_fail;
			}
			if (curr_vreg->type == REG_LDO) {
			if (regulator_count_voltages(reg_ptr[j]) > 0) {
				rc = regulator_set_voltage(
					reg_ptr[j],
					curr_vreg->min_voltage,
@@ -295,7 +295,7 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
				j = i;
			curr_vreg = &cam_vreg[j];
			if (reg_ptr[j]) {
				if (curr_vreg->type == REG_LDO) {
				if (regulator_count_voltages(reg_ptr[j]) > 0) {
					if (curr_vreg->op_mode >= 0) {
						regulator_set_optimum_mode(
							reg_ptr[j], 0);
@@ -312,11 +312,11 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
	return 0;

vreg_unconfig:
if (curr_vreg->type == REG_LDO)
if (regulator_count_voltages(reg_ptr[j]) > 0)
	regulator_set_optimum_mode(reg_ptr[j], 0);

vreg_set_opt_mode_fail:
if (curr_vreg->type == REG_LDO)
if (regulator_count_voltages(reg_ptr[j]) > 0)
	regulator_set_voltage(reg_ptr[j], 0,
		curr_vreg->max_voltage);

@@ -486,7 +486,7 @@ int msm_camera_config_single_vreg(struct device *dev,
			*reg_ptr = NULL;
			goto vreg_get_fail;
		}
		if (cam_vreg->type == REG_LDO) {
		if (regulator_count_voltages(*reg_ptr) > 0) {
			rc = regulator_set_voltage(
				*reg_ptr, cam_vreg->min_voltage,
				cam_vreg->max_voltage);
@@ -516,7 +516,7 @@ int msm_camera_config_single_vreg(struct device *dev,
		if (*reg_ptr) {
			CDBG("%s disable %s\n", __func__, cam_vreg->reg_name);
			regulator_disable(*reg_ptr);
			if (cam_vreg->type == REG_LDO) {
			if (regulator_count_voltages(*reg_ptr) > 0) {
				if (cam_vreg->op_mode >= 0)
					regulator_set_optimum_mode(*reg_ptr, 0);
				regulator_set_voltage(
@@ -529,11 +529,11 @@ int msm_camera_config_single_vreg(struct device *dev,
	return 0;

vreg_unconfig:
if (cam_vreg->type == REG_LDO)
if (regulator_count_voltages(*reg_ptr) > 0)
	regulator_set_optimum_mode(*reg_ptr, 0);

vreg_set_opt_mode_fail:
if (cam_vreg->type == REG_LDO)
if (regulator_count_voltages(*reg_ptr) > 0)
	regulator_set_voltage(*reg_ptr, 0, cam_vreg->max_voltage);

vreg_set_voltage_fail:
+0 −1
Original line number Diff line number Diff line
@@ -373,7 +373,6 @@ struct msm_sensor_info_t {

struct camera_vreg_t {
	const char *reg_name;
	enum camera_vreg_type type;
	int min_voltage;
	int max_voltage;
	int op_mode;
Loading