From: Liam Girdwood <lrg@kernel.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Haojian Zhuang <haojian.zhuang@marvell.com>,
Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: Ensure enough enable time for max8649
Date: Mon, 08 Aug 2011 17:44:36 +0100 [thread overview]
Message-ID: <1312821876.3316.6.camel@odin> (raw)
In-Reply-To: <1312260896.6161.1.camel@phoenix>
On Tue, 2011-08-02 at 12:54 +0800, Axel Lin wrote:
> Integer division may truncate the result, thus max8649_enable_time() may return
> slightly shorter enable time. This patch fixes it.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/regulator/max8649.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
> index 30eb9e5..1062cf9 100644
> --- a/drivers/regulator/max8649.c
> +++ b/drivers/regulator/max8649.c
> @@ -221,7 +221,7 @@ static int max8649_enable_time(struct regulator_dev *rdev)
> ret = (ret & MAX8649_RAMP_MASK) >> 5;
> rate = (32 * 1000) >> ret; /* uV/uS */
>
> - return (voltage / rate);
> + return DIV_ROUND_UP(voltage, rate);
> }
>
> static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
Applied.
Thanks
Liam
prev parent reply other threads:[~2011-08-08 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 4:54 [PATCH] regulator: Ensure enough enable time for max8649 Axel Lin
2011-08-02 6:01 ` Mark Brown
2011-08-08 16:44 ` Liam Girdwood [this message]
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=1312821876.3316.6.camel@odin \
--to=lrg@kernel.org \
--cc=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=haojian.zhuang@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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 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.