lkml.org 
[lkml]   [2014]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFT PATCH] regulator: s2mpa01: Use correct register for buck[36] ramp delay
From
Date
Hi Sachin,

The s2mpa01 regulator driver uses wrong registers for ramp delay (buck1
and buck3 in RAMP1, buck6 in RAMP2) but I am not sure which layout is
proper (it seems that that buck1 should be in RAMP2 register).

Could you check in S2MPA01 datasheet the registers for ramp delay for
buck1, buck3 and buck6?

I have prepared patches for merging s2mpa01 and s2mps11 but this one
issue is holding them.

Best regards,
Krzysztof


On śro, 2014-05-07 at 13:10 +0200, Krzysztof Kozlowski wrote:
> 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:

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-05-23 17:01    [W:0.246 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site