From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Sangbeom Kim <sbkim73@samsung.com>
Subject: Re: [RFT PATCH] regulator: s2mpa01: Use correct register for buck[36] ramp delay
Date: Wed, 07 May 2014 13:10:43 +0200 [thread overview]
Message-ID: <1399461043.22811.3.camel@AMDC1943> (raw)
In-Reply-To: <1399456358-12168-1-git-send-email-k.kozlowski@samsung.com>
Hi Sachin,
I'm looking at SM-N7505 JB Open source code and it seems that I was
wrong - the ramp delay for buck1 is set in wrong register, not buck3.
I don't have the datasheet for S2MPA01 so could you confirm the
registers for ramp delay of buck1, buck3 and buck6?
Best regards,
Krzysztof
On śro, 2014-05-07 at 11:52 +0200, Krzysztof Kozlowski wrote:
> Buck1 and buck6 share the field (offset 4) in ramp delay register
> (S2MPA01_REG_RAMP1). The buck3 uses its own field in S2MPA01_REG_RAMP2
> register, also at offset 4.
>
> The driver interchanged the registers for ramp delay of buck3 and buck6.
> This lead to updating ramp delay for wrong buck (buck3 instead of buck6
> and vice versa).
>
> Cc: <stable@vger.kernel.org>
> Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator")
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> drivers/regulator/s2mpa01.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
> index f19a30f0fb42..67a5ab335dae 100644
> --- a/drivers/regulator/s2mpa01.c
> +++ b/drivers/regulator/s2mpa01.c
> @@ -137,17 +137,16 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
> enable_shift = S2MPA01_BUCK3_RAMP_EN_SHIFT;
> if (!ramp_delay) {
> ramp_enable = 0;
> break;
> }
>
> s2mpa01->ramp_delay3 = ramp_delay;
> ramp_shift = S2MPA01_BUCK3_RAMP_SHIFT;
> - ramp_reg = S2MPA01_REG_RAMP1;
> break;
> case S2MPA01_BUCK4:
> enable_shift = S2MPA01_BUCK4_RAMP_EN_SHIFT;
> if (!ramp_delay) {
> ramp_enable = 0;
> break;
> }
>
> @@ -165,16 +164,17 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
> break;
> case S2MPA01_BUCK6:
> if (ramp_delay > s2mpa01->ramp_delay16)
> s2mpa01->ramp_delay16 = ramp_delay;
> else
> ramp_delay = s2mpa01->ramp_delay16;
>
> ramp_shift = S2MPA01_BUCK16_RAMP_SHIFT;
> + ramp_reg = S2MPA01_REG_RAMP1;
> break;
> case S2MPA01_BUCK7:
> s2mpa01->ramp_delay7 = ramp_delay;
> ramp_shift = S2MPA01_BUCK7_RAMP_SHIFT;
> break;
> case S2MPA01_BUCK8:
> case S2MPA01_BUCK9:
> case S2MPA01_BUCK10:
next prev parent reply other threads:[~2014-05-07 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 9:52 [RFT PATCH] regulator: s2mpa01: Use correct register for buck[36] ramp delay Krzysztof Kozlowski
2014-05-07 11:10 ` Krzysztof Kozlowski [this message]
2014-05-23 14:19 ` Krzysztof Kozlowski
2014-05-26 8:07 ` Sachin Kamat
2014-05-26 8:34 ` Krzysztof Kozlowski
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=1399461043.22811.3.camel@AMDC1943 \
--to=k.kozlowski@samsung.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sachin.kamat@linaro.org \
--cc=sbkim73@samsung.com \
--cc=stable@vger.kernel.org \
/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