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

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

Merge "regulator: spm-regulator: Fix the usage of the 'uV' variable"

parents b4b90919 57f829c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -295,14 +295,14 @@ static int spm_regulator_write_voltage(struct spm_vreg *vreg, int uV)

	if (uV > vreg->last_set_uV) {
		/* Wait for voltage stepping to complete. */
		slew_delay = DIV_ROUND_UP(vreg->uV - vreg->last_set_uV,
		slew_delay = DIV_ROUND_UP(uV - vreg->last_set_uV,
					vreg->step_rate);
		if (vreg->regulator_type == QPNP_TYPE_FTS2p5)
			slew_delay += FTS2P5_SETTLING_DELAY_US;
		udelay(slew_delay);
	} else if (vreg->regulator_type == QPNP_TYPE_FTS2p5) {
		/* add the ramp-down delay */
		slew_delay = DIV_ROUND_UP(vreg->last_set_uV - vreg->uV,
		slew_delay = DIV_ROUND_UP(vreg->last_set_uV - uV,
				vreg->step_rate) + FTS2P5_SETTLING_DELAY_US;
		udelay(slew_delay);
	}