Skip to contentSkip to conversation

regulator: Fix s5m8767_set_voltage_time_sel calculation value

PATCH Applied Sangbeom Kim 2 participants 2 messages Mar 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: Fix s5m8767_set_voltage_time_sel calculation value

In the s5m8767_set_voltage_time_sel function, divisor unit is wrong. ramp_delay is usec unit. So 1000 should be multiplied.

---
 drivers/regulator/s5m8767.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/s5m8767.c +1 -1
index e369d9e..3592ccb 100644
@@ -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;
 }
 
Signature · 1 line
1.7.1
Applied
#1 lore raw
Quoted 2 lines · Sangbeom Kim

In the s5m8767_set_voltage_time_sel function, divisor unit is wrong. ramp_delay is usec unit. So 1000 should be multiplied.

Applied, thanks.