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

Commit 6ff325a2 authored by Donggeun Kim's avatar Donggeun Kim Committed by Liam Girdwood
Browse files

regulator: max8997: Fix setting inappropriate value for ramp_delay variable



The ramp_delay variable can be set lower than the desired value.
This patch fixes it.

Signed-off-by: default avatarDonggeun Kim <dg77.kim@samsung.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarKyungMin Park <kyungmin.park@samsung.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 90609503
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -544,7 +544,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
			rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
			rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
		/* If the voltage is increasing */
		/* If the voltage is increasing */
		if (org < i)
		if (org < i)
			udelay(desc->step * (i - org) / max8997->ramp_delay);
			udelay(DIV_ROUND_UP(desc->step * (i - org),
						max8997->ramp_delay));
	}
	}


	return ret;
	return ret;