提交 23ca6bf2 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: max77686: Fix the delay time for set_voltage_time_sel

rdev->desc->uV_step * abs(new_selector - old_selector) returns uV.
The unit of ramp_rate is mV/us.
Thus 1000 should be multiplied.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Reviewed-by: NYadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 98a175b6
......@@ -77,7 +77,7 @@ static int max77686_set_dvs_voltage_time_sel(struct regulator_dev *rdev,
return DIV_ROUND_UP(rdev->desc->uV_step *
abs(new_selector - old_selector),
ramp_rate[max77686->ramp_delay]);
ramp_rate[max77686->ramp_delay] * 1000);
}
static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,
......@@ -85,7 +85,7 @@ static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,
{
/* Unconditionally 100 mV/us */
return DIV_ROUND_UP(rdev->desc->uV_step *
abs(new_selector - old_selector), 100);
abs(new_selector - old_selector), 100 * 1000);
}
static struct regulator_ops max77686_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册