public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode
@ 2010-09-06  6:06 Axel Lin
  2010-09-06  9:23 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-09-06  6:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mark Brown, Liam Girdwood

In wm8350_dcdc_set_mode(), we set DCx_SLEEP bit of WM8350_DCDC_SLEEP_OPTIONS
register for REGULATOR_MODE_STANDBY mode.
( DCx_SLEEP bits: 0: Normal DC-DC operation 1: Select LDO mode )

In wm8350_dcdc_get_mode(), current logic to determinate
REGULATOR_MODE_STANDBY mode is just reverse.
( sleep is set should mean REGULATOR_MODE_STANDBY mode. )

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

diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 0e6ed7d..fe4b8a8 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1129,7 +1129,7 @@ static unsigned int wm8350_dcdc_get_mode(struct regulator_dev *rdev)
 			mode = REGULATOR_MODE_NORMAL;
 	} else if (!active && !sleep)
 		mode = REGULATOR_MODE_IDLE;
-	else if (!sleep)
+	else if (sleep)
 		mode = REGULATOR_MODE_STANDBY;
 
 	return mode;
-- 
1.7.2




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

* Re: [PATCH] regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode
  2010-09-06  6:06 [PATCH] regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode Axel Lin
@ 2010-09-06  9:23 ` Mark Brown
  2010-09-06 10:22   ` Liam Girdwood
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2010-09-06  9:23 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Liam Girdwood

On Mon, Sep 06, 2010 at 02:06:07PM +0800, Axel Lin wrote:
> In wm8350_dcdc_set_mode(), we set DCx_SLEEP bit of WM8350_DCDC_SLEEP_OPTIONS
> register for REGULATOR_MODE_STANDBY mode.
> ( DCx_SLEEP bits: 0: Normal DC-DC operation 1: Select LDO mode )

> In wm8350_dcdc_get_mode(), current logic to determinate
> REGULATOR_MODE_STANDBY mode is just reverse.
> ( sleep is set should mean REGULATOR_MODE_STANDBY mode. )
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

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

but *please* do try to make your commit messages clearer, it's difficult
to follow what you're sayin here, mostly because you don't explain how
you determined what change to make.

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

* Re: [PATCH] regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode
  2010-09-06  9:23 ` Mark Brown
@ 2010-09-06 10:22   ` Liam Girdwood
  0 siblings, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2010-09-06 10:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Axel Lin, linux-kernel

On Mon, 2010-09-06 at 10:23 +0100, Mark Brown wrote:
> On Mon, Sep 06, 2010 at 02:06:07PM +0800, Axel Lin wrote:
> > In wm8350_dcdc_set_mode(), we set DCx_SLEEP bit of WM8350_DCDC_SLEEP_OPTIONS
> > register for REGULATOR_MODE_STANDBY mode.
> > ( DCx_SLEEP bits: 0: Normal DC-DC operation 1: Select LDO mode )
> 
> > In wm8350_dcdc_get_mode(), current logic to determinate
> > REGULATOR_MODE_STANDBY mode is just reverse.
> > ( sleep is set should mean REGULATOR_MODE_STANDBY mode. )
> > 
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

All applied (last 4 regulator patches from Axel).

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


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

end of thread, other threads:[~2010-09-06 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06  6:06 [PATCH] regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode Axel Lin
2010-09-06  9:23 ` Mark Brown
2010-09-06 10:22   ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox