* [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel
@ 2012-06-08 9:21 Axel Lin
2012-06-09 4:20 ` Yadwinder Singh Brar
2012-06-11 4:09 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-06-08 9:21 UTC (permalink / raw)
To: linux-kernel
Cc: Chiwoong Byun, Jonghwa Lee, Myungjoo Ham, Kyungmin Park,
Yadwinder Singh Brar, Mark Brown, Liam Girdwood
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: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/max77686.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index b76a038..10bf65a 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -78,7 +78,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,
@@ -86,7 +86,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 = {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel
2012-06-08 9:21 [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel Axel Lin
@ 2012-06-09 4:20 ` Yadwinder Singh Brar
2012-06-11 4:09 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Yadwinder Singh Brar @ 2012-06-09 4:20 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Chiwoong Byun, Jonghwa Lee, Myungjoo Ham,
Kyungmin Park, Yadwinder Singh Brar, Mark Brown
On Fri, Jun 8, 2012 at 2:51 PM, Axel Lin <axel.lin@gmail.com> wrote:
> 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: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/regulator/max77686.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
> index b76a038..10bf65a 100644
> --- a/drivers/regulator/max77686.c
> +++ b/drivers/regulator/max77686.c
> @@ -78,7 +78,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,
> @@ -86,7 +86,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 = {
> --
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Thanks,
Yadwinder.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel
2012-06-08 9:21 [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel Axel Lin
2012-06-09 4:20 ` Yadwinder Singh Brar
@ 2012-06-11 4:09 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-06-11 4:09 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Chiwoong Byun, Jonghwa Lee, Myungjoo Ham,
Kyungmin Park, Yadwinder Singh Brar, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
On Fri, Jun 08, 2012 at 05:21:44PM +0800, Axel Lin wrote:
> rdev->desc->uV_step * abs(new_selector - old_selector) returns uV.
> The unit of ramp_rate is mV/us.
> Thus 1000 should be multiplied.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-11 4:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08 9:21 [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel Axel Lin
2012-06-09 4:20 ` Yadwinder Singh Brar
2012-06-11 4:09 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox