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

Commit b72d5b8c authored by Ke Liu's avatar Ke Liu
Browse files

regulator: qpnp-labibb-regulator: fix the delay setting for LAB/IBB



Currently while setting the voltage for LAB/IBB regulators delay is
configured wrongly because of setting an additional bit. Fix it.

CRs-Fixed: 782661
Change-Id: I56341c9c1c8f82be25593926f807446017e30eac
Signed-off-by: default avatarKe Liu <keliu@codeaurora.org>
parent 5a229196
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -1026,13 +1026,11 @@ static int qpnp_lab_regulator_set_voltage(struct regulator_dev *rdev,
		return -EINVAL;
		return -EINVAL;
	}
	}


	val |= LAB_VOLTAGE_OVERRIDE_EN;

	rc = qpnp_labibb_masked_write(labibb, labibb->lab_base +
	rc = qpnp_labibb_masked_write(labibb, labibb->lab_base +
				REG_LAB_VOLTAGE,
				REG_LAB_VOLTAGE,
				LAB_VOLTAGE_SET_MASK |
				LAB_VOLTAGE_SET_MASK |
				LAB_VOLTAGE_OVERRIDE_EN,
				LAB_VOLTAGE_OVERRIDE_EN,
				val,
				val | LAB_VOLTAGE_OVERRIDE_EN,
				1);
				1);


	if (rc) {
	if (rc) {
@@ -1910,13 +1908,11 @@ static int qpnp_ibb_regulator_set_voltage(struct regulator_dev *rdev,
		return -EINVAL;
		return -EINVAL;
	}
	}


	val |= IBB_VOLTAGE_OVERRIDE_EN;

	rc = qpnp_labibb_masked_write(labibb, labibb->ibb_base +
	rc = qpnp_labibb_masked_write(labibb, labibb->ibb_base +
				REG_IBB_VOLTAGE,
				REG_IBB_VOLTAGE,
				IBB_VOLTAGE_SET_MASK |
				IBB_VOLTAGE_SET_MASK |
				IBB_VOLTAGE_OVERRIDE_EN,
				IBB_VOLTAGE_OVERRIDE_EN,
				val,
				val | IBB_VOLTAGE_OVERRIDE_EN,
				1);
				1);


	if (rc) {
	if (rc) {