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

Commit e0449bcc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "pwm: qpnp: Read dtest configuration before checking mode"

parents c1a5a21e 33094d52
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -1885,6 +1885,20 @@ static int qpnp_parse_dt_config(struct spmi_device *spmi,
		}
	}

	rc = of_property_read_u32(of_node, "qcom,lpg-dtest-line",
		&chip->dtest_line);
	if (rc) {
		chip->in_test_mode = 0;
	} else {
		chip->in_test_mode = 1;
		rc = of_property_read_u32(of_node, "qcom,dtest-output",
			&chip->dtest_output);
		if (rc) {
			pr_err("Missing DTEST output configuration\n");
			chip->dtest_output = 0;
		}
	}

	for_each_child_of_node(of_node, node) {
		rc = of_property_read_string(node, "label", &lable);
		if (rc) {
@@ -1920,20 +1934,6 @@ static int qpnp_parse_dt_config(struct spmi_device *spmi,
		goto out;
	}

	rc = of_property_read_u32(of_node, "qcom,lpg-dtest-line",
		&chip->dtest_line);
	if (rc) {
		chip->in_test_mode = 0;
	} else {
		chip->in_test_mode = 1;
		rc = of_property_read_u32(of_node, "qcom,dtest-output",
			&chip->dtest_output);
		if (rc) {
			pr_err("Missing DTEST output configuration\n");
			chip->dtest_output = 0;
		}
	}

	_pwm_change_mode(chip, enable);
	_pwm_enable(chip);