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

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

Merge "regulator: qpnp-lcdb: Correct the get_voltage calculation"

parents d65fef18 8c9c2bb7
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1151,6 +1151,7 @@ static int qpnp_lcdb_get_voltage(struct qpnp_lcdb *lcdb,
		return rc;
		return rc;
	}
	}


	val &= SET_OUTPUT_VOLTAGE_MASK;
	if (val < VOLTAGE_STEP_50MV_OFFSET) {
	if (val < VOLTAGE_STEP_50MV_OFFSET) {
		*voltage_mv = VOLTAGE_MIN_STEP_100_MV +
		*voltage_mv = VOLTAGE_MIN_STEP_100_MV +
				(val * VOLTAGE_STEP_100_MV);
				(val * VOLTAGE_STEP_100_MV);
@@ -1826,7 +1827,7 @@ static int qpnp_lcdb_init_bst(struct qpnp_lcdb *lcdb)


		if (lcdb->bst.pd_strength != -EINVAL) {
		if (lcdb->bst.pd_strength != -EINVAL) {
			rc = qpnp_lcdb_masked_write(lcdb, lcdb->base +
			rc = qpnp_lcdb_masked_write(lcdb, lcdb->base +
				LCDB_NCP_PD_CTL_REG, BOOST_PD_STRENGTH_BIT,
				LCDB_BST_PD_CTL_REG, BOOST_PD_STRENGTH_BIT,
				lcdb->bst.pd_strength ?
				lcdb->bst.pd_strength ?
				BOOST_PD_STRENGTH_BIT : 0);
				BOOST_PD_STRENGTH_BIT : 0);
			if (rc < 0) {
			if (rc < 0) {