regulator: Fix s5m8767_set_voltage_time_sel calculation value
authorSangbeom Kim <sbkim73@samsung.com>
Fri, 9 Mar 2012 07:28:10 +0000 (16:28 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Mar 2012 20:49:29 +0000 (20:49 +0000)
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>
drivers/regulator/s5m8767.c

index e369d9ebec5dccb1e3c7245402035252e657bf1f..3592ccb4e6034350514ac2b7060f42b8e4e4816f 100644 (file)
@@ -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;
 }