* [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo
@ 2012-03-29 7:02 Axel Lin
2012-03-29 7:04 ` [PATCH 2/2] regulator: Trivial comment fix for wm831x-ldo driver Axel Lin
2012-03-29 11:10 ` [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-03-29 7:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown
Set BIT[8] of LDO7 ON Control mode for low power mode.
R16507 (407Bh) LDO7 ON Control
BIT[8] LDO7_ON_MODE: LDO7 ON Operating Mode
0 = Normal mode
1 = Low Power mode
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/wm831x-ldo.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index f1e4ab0..641e9f6 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -506,22 +506,19 @@ static int wm831x_aldo_set_mode(struct regulator_dev *rdev,
{
struct wm831x_ldo *ldo = rdev_get_drvdata(rdev);
struct wm831x *wm831x = ldo->wm831x;
- int ctrl_reg = ldo->base + WM831X_LDO_CONTROL;
int on_reg = ldo->base + WM831X_LDO_ON_CONTROL;
int ret;
switch (mode) {
case REGULATOR_MODE_NORMAL:
- ret = wm831x_set_bits(wm831x, on_reg,
- WM831X_LDO7_ON_MODE, 0);
+ ret = wm831x_set_bits(wm831x, on_reg, WM831X_LDO7_ON_MODE, 0);
if (ret < 0)
return ret;
break;
case REGULATOR_MODE_IDLE:
- ret = wm831x_set_bits(wm831x, ctrl_reg,
- WM831X_LDO7_ON_MODE,
+ ret = wm831x_set_bits(wm831x, on_reg, WM831X_LDO7_ON_MODE,
WM831X_LDO7_ON_MODE);
if (ret < 0)
return ret;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] regulator: Trivial comment fix for wm831x-ldo driver
2012-03-29 7:02 [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Axel Lin
@ 2012-03-29 7:04 ` Axel Lin
2012-03-29 11:10 ` [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2012-03-29 7:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/wm831x-ldo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 641e9f6..a86a7be 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -105,7 +105,7 @@ static int wm831x_gp_ldo_list_voltage(struct regulator_dev *rdev,
/* 0.9-1.6V in 50mV steps */
if (selector <= WM831X_GP_LDO_SELECTOR_LOW)
return 900000 + (selector * 50000);
- /* 1.7-3.3V in 50mV steps */
+ /* 1.7-3.3V in 100mV steps */
if (selector <= WM831X_GP_LDO_MAX_SELECTOR)
return 1600000 + ((selector - WM831X_GP_LDO_SELECTOR_LOW)
* 100000);
@@ -414,7 +414,7 @@ static int wm831x_aldo_list_voltage(struct regulator_dev *rdev,
/* 1-1.6V in 50mV steps */
if (selector <= WM831X_ALDO_SELECTOR_LOW)
return 1000000 + (selector * 50000);
- /* 1.7-3.5V in 50mV steps */
+ /* 1.7-3.5V in 100mV steps */
if (selector <= WM831X_ALDO_MAX_SELECTOR)
return 1600000 + ((selector - WM831X_ALDO_SELECTOR_LOW)
* 100000);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo
2012-03-29 7:02 [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Axel Lin
2012-03-29 7:04 ` [PATCH 2/2] regulator: Trivial comment fix for wm831x-ldo driver Axel Lin
@ 2012-03-29 11:10 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-03-29 11:10 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 138 bytes --]
On Thu, Mar 29, 2012 at 03:02:55PM +0800, Axel Lin wrote:
> Set BIT[8] of LDO7 ON Control mode for low power mode.
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-29 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 7:02 [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Axel Lin
2012-03-29 7:04 ` [PATCH 2/2] regulator: Trivial comment fix for wm831x-ldo driver Axel Lin
2012-03-29 11:10 ` [PATCH 1/2] regulator: Fix setting low power mode for wm831x aldo Mark Brown
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.