All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Donggeun Kim <dg77.kim@samsung.com>
Cc: linux-kernel@vger.kernel.org, lrg@ti.com,
	broonie@opensource.wolfsonmicro.com, myungjoo.ham@samsung.com,
	kyungmin.park@samsung.com
Subject: Re: [PATCH] regulator: max8997: Fix setting inappropriate value for ramp_delay variable
Date: Fri, 08 Jul 2011 19:28:11 +0100	[thread overview]
Message-ID: <1310149691.3348.6.camel@odin> (raw)
In-Reply-To: <1310025116-30787-1-git-send-email-dg77.kim@samsung.com>

On Thu, 2011-07-07 at 16:51 +0900, Donggeun Kim wrote:
> The ramp_delay variable can be set lower than the desired value.
> This patch fixes it.
> 
> Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
> ---
>  drivers/regulator/max8997.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
> index 10d5a1d..682bc79 100644
> --- a/drivers/regulator/max8997.c
> +++ b/drivers/regulator/max8997.c
> @@ -543,7 +543,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
>  			rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
>  		/* If the voltage is increasing */
>  		if (org < i)
> -			udelay(desc->step * (i - org) / max8997->ramp_delay);
> +			udelay(DIV_ROUND_UP(desc->step * (i - org),
> +						max8997->ramp_delay));
>  	}
>  
>  	return ret;

Applied.


      parent reply	other threads:[~2011-07-08 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07  7:51 [PATCH] regulator: max8997: Fix setting inappropriate value for ramp_delay variable Donggeun Kim
2011-07-07 15:26 ` Mark Brown
2011-07-08 18:28 ` 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=1310149691.3348.6.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dg77.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=myungjoo.ham@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 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.