提交 6ff325a2 编写于 作者: D Donggeun Kim 提交者: Liam Girdwood

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: NDonggeun Kim <dg77.kim@samsung.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: NKyungMin Park <kyungmin.park@samsung.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 90609503
......@@ -544,7 +544,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
/* If the voltage is increasing */
if (org < i)
udelay(desc->step * (i - org) / max8997->ramp_delay);
udelay(DIV_ROUND_UP(desc->step * (i - org),
max8997->ramp_delay));
}
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册