[PATCH] regulator: wm8350-regulator - fix the logic of checkingREGULATOR_MODE_STANDBY mode

From: Axel Lin
Date: Mon Sep 06 2010 - 02:02:12 EST


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@xxxxxxxxx>
---
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



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