public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Chiwoong Byun <woong.byun@samsung.com>,
	Jonghwa Lee <jonghwa3.lee@samsung.com>,
	Myungjoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Yadwinder Singh Brar <yadi.brar@samsung.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Subject: [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel
Date: Fri, 08 Jun 2012 17:21:44 +0800	[thread overview]
Message-ID: <1339147304.5216.1.camel@phoenix> (raw)

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




             reply	other threads:[~2012-06-08  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08  9:21 Axel Lin [this message]
2012-06-09  4:20 ` [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel Yadwinder Singh Brar
2012-06-11  4:09 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339147304.5216.1.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=woong.byun@samsung.com \
    --cc=yadi.brar@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox