Skip to content

Commit

Permalink
regulator: Fix s5m8767_set_voltage_time_sel calculation value
Browse files Browse the repository at this point in the history
In the s5m8767_set_voltage_time_sel function, divisor unit is wrong.
ramp_delay is usec unit. So 1000 should be multiplied.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Sangbeom Kim authored and Mark Brown committed Mar 11, 2012
1 parent 394ee3d commit 0f8b9c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/s5m8767.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev,

if (old_sel < new_sel)
return DIV_ROUND_UP(desc->step * (new_sel - old_sel),
s5m8767->ramp_delay);
s5m8767->ramp_delay * 1000);
return 0;
}

Expand Down

0 comments on commit 0f8b9c7

Please sign in to comment.