public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	Sachin Kamat <sachin.kamat@linaro.org>,
	Axel Lin <axel.lin@ingics.com>,
	Sangbeom Kim <sbkim73@samsung.com>
Subject: Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay
Date: Wed, 07 May 2014 11:48:25 +0200	[thread overview]
Message-ID: <1399456105.15392.3.camel@AMDC1943> (raw)
In-Reply-To: <1399358258-21536-1-git-send-email-k.kozlowski@samsung.com>

I forgot to CC the stable.

Mark, if the patches are OK and if you'll apply them, could you add a CC
stable to the commit msg?

Best regards,
Krzysztof


On wto, 2014-05-06 at 08:37 +0200, Krzysztof Kozlowski wrote:
> S2MPS11 supports enabling/disabling ramp delay only for buck[2346].
> Other bucks have ramp delay enabled always.
> 
> However the bit shift for enabling buck6 ramp delay in register is equal
> to 0. When ramp delay was set for the bucks unsupporting enable/disable
> (buck[15789] and buck10), the ramp delay for buck6 was also enabled.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before setting enable ramp rate")
> ---
> 
> Changes since v2:
>  * Apply Axel Lin's suggestion (don't change the meaning
>    of enable_shift variable).
> 
> ---
>  drivers/regulator/s2mps11.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
> index e713c162fbd4..aaca37e1424f 100644
> --- a/drivers/regulator/s2mps11.c
> +++ b/drivers/regulator/s2mps11.c
> @@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
>  	if (!ramp_enable)
>  		goto ramp_disable;
>  
> -	ret = regmap_update_bits(rdev->regmap, S2MPS11_REG_RAMP,
> -				 1 << enable_shift, 1 << enable_shift);
> -	if (ret) {
> -		dev_err(&rdev->dev, "failed to enable ramp rate\n");
> -		return ret;
> +	/* Ramp delay can be enabled/disabled only for buck[2346] */
> +	if ((rdev_get_id(rdev) >= S2MPS11_BUCK2 &&
> +			rdev_get_id(rdev) <= S2MPS11_BUCK4) ||
> +			rdev_get_id(rdev) == S2MPS11_BUCK6)  {
> +		ret = regmap_update_bits(rdev->regmap, S2MPS11_REG_RAMP,
> +					 1 << enable_shift, 1 << enable_shift);
> +		if (ret) {
> +			dev_err(&rdev->dev, "failed to enable ramp rate\n");
> +			return ret;
> +		}
>  	}
>  
>  	ramp_val = get_ramp_delay(ramp_delay);


  parent reply	other threads:[~2014-05-07  9:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06  6:37 [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay Krzysztof Kozlowski
2014-05-06  6:37 ` [PATCH v2 2/3] regulator: s2mpa01: Fix accidental enable of buck4 " Krzysztof Kozlowski
2014-05-06  6:37 ` [PATCH v2 3/3] regulator: s2mpa01: Use rdev_get_id() to access id of regulator Krzysztof Kozlowski
2014-05-17 13:30   ` Mark Brown
2014-05-06  6:45 ` [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay Axel Lin
2014-05-07  9:48 ` Krzysztof Kozlowski [this message]
2014-05-12  7:03   ` Axel Lin

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=1399456105.15392.3.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=sbkim73@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