All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Return correct delay time in regulator_set_voltage_time_sel
@ 2012-06-11  5:14 Axel Lin
  2012-06-11  5:37 ` Mark Brown
  2012-06-11  6:59 ` Yadwinder Singh Brar
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-06-11  5:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Yadwinder Singh Brar, Liam Girdwood, Mark Brown

rdev->desc->uV_step * abs(new_selector - old_selector) returns uV.
The unit of ramp_delay is mV/us.

Current code multiples 1000 at wrong place.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f4c056a..63507a5 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2308,7 +2308,7 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
 	if (rdev->desc->ramp_delay && rdev->desc->uV_step)
 		return DIV_ROUND_UP(rdev->desc->uV_step *
 			abs(new_selector - old_selector),
-			rdev->desc->ramp_delay) * 1000;
+			rdev->desc->ramp_delay * 1000);
 	return 0;
 }
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-11  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11  5:14 [PATCH] regulator: core: Return correct delay time in regulator_set_voltage_time_sel Axel Lin
2012-06-11  5:37 ` Mark Brown
2012-06-11  6:59 ` Yadwinder Singh Brar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.