All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
@ 2010-03-09  9:14 axel lin
  2010-03-09 14:27 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: axel lin @ 2010-03-09  9:14 UTC (permalink / raw)
  To: linux-kernel

>From 4e4c5f8267a4fbf651b4cc26c5f72465514f6224 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@gmail.com>
Date: Tue, 9 Mar 2010 16:53:59 +0800
Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4

In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.
---
 drivers/regulator/lp3971.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index f5532ed..a28ae37 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
                return -EINVAL;

        return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
-               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val);
+               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo),
+               val << LDO_VOL_CONTR_SHIFT(ldo));
 }

 static struct regulator_ops lp3971_ldo_ops = {
--
1.5.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
  2010-03-09  9:14 [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4 axel lin
@ 2010-03-09 14:27 ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-03-09 14:27 UTC (permalink / raw)
  To: axel lin, Marek Szyprowski, Kyungmin Park; +Cc: linux-kernel, lrg

On Tue, Mar 09, 2010 at 05:14:53PM +0800, axel lin wrote:
> From 4e4c5f8267a4fbf651b4cc26c5f72465514f6224 Mon Sep 17 00:00:00 2001
> From: Axel Lin <axel.lin@gmail.com>
> Date: Tue, 9 Mar 2010 16:53:59 +0800
> Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4

Please try to follow the instructions for submitting patches in
Documentation/SubmittingPatches - this is missing Signed-off-by and CCs
to maintainers.

> In lp3971_ldo_set_voltage function, it requires val to left shift 4
> bits for LDO2 and LDO4.
> This patch fix this issue.

CCing in the folks who worked with the hardware for confirmation - the
patch looks OK to me but it's surprising that this wasn't noticed when
the driver was being developed, it might be that the chip is doing
something strange here.

> ---
>  drivers/regulator/lp3971.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
> index f5532ed..a28ae37 100644
> --- a/drivers/regulator/lp3971.c
> +++ b/drivers/regulator/lp3971.c
> @@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
>                 return -EINVAL;
> 
>         return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
> -               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val);
> +               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo),
> +               val << LDO_VOL_CONTR_SHIFT(ldo));
>  }
> 
>  static struct regulator_ops lp3971_ldo_ops = {

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
  2010-03-10 17:07 ` Mark Brown
@ 2010-03-15  6:44   ` Marek Szyprowski
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Szyprowski @ 2010-03-15  6:44 UTC (permalink / raw)
  To: 'Mark Brown', 'axel lin'
  Cc: 'linux-kernel', 'Kyungmin Park', lrg

Hello,

On Wednesday, March 10, 2010 6:07 PM Mark Brown wrote:

> On Wed, Mar 10, 2010 at 08:29:40AM +0800, axel lin wrote:
> > From: Axel Lin <axel.lin@gmail.com>
> > Date: Tue, 9 Mar 2010 16:53:59 +0800
> > Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4
> >
> > In lp3971_ldo_set_voltage function, it requires val to left shift 4
> > bits for LDO2 and LDO4.
> > This patch fix this issue.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> 
> but I really would prefer to see one of the Samsung folks comment.

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

This was definitely a bug. Thanks for spotting it.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
  2010-03-10  0:29 axel lin
@ 2010-03-10 17:07 ` Mark Brown
  2010-03-15  6:44   ` Marek Szyprowski
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2010-03-10 17:07 UTC (permalink / raw)
  To: axel lin; +Cc: linux-kernel, Marek Szyprowski, Kyungmin Park, lrg

On Wed, Mar 10, 2010 at 08:29:40AM +0800, axel lin wrote:
> From: Axel Lin <axel.lin@gmail.com>
> Date: Tue, 9 Mar 2010 16:53:59 +0800
> Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4
> 
> In lp3971_ldo_set_voltage function, it requires val to left shift 4
> bits for LDO2 and LDO4.
> This patch fix this issue.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

but I really would prefer to see one of the Samsung folks comment.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4
@ 2010-03-10  0:29 axel lin
  2010-03-10 17:07 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: axel lin @ 2010-03-10  0:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mark Brown, Marek Szyprowski, Kyungmin Park, lrg

From: Axel Lin <axel.lin@gmail.com>
Date: Tue, 9 Mar 2010 16:53:59 +0800
Subject: [PATCH] lp3971: Fix setting val for LDO2 and LDO4

In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/lp3971.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index f5532ed..a28ae37 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
                return -EINVAL;

        return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
-               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val);
+               LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo),
+               val << LDO_VOL_CONTR_SHIFT(ldo));
 }

 static struct regulator_ops lp3971_ldo_ops = {
--
1.5.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-15  6:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-09  9:14 [PATCH] Regulators: lp3971 - Fix setting val for LDO2 and LDO4 axel lin
2010-03-09 14:27 ` Mark Brown
2010-03-10  0:29 axel lin
2010-03-10 17:07 ` Mark Brown
2010-03-15  6:44   ` Marek Szyprowski

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.