* [PATCH] regulator: Fix the logic of tps65910_get_mode
@ 2012-03-12 23:15 Axel Lin
2012-03-13 5:28 ` Laxman Dewangan
2012-03-13 23:18 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-03-12 23:15 UTC (permalink / raw)
To: linux-kernel
Cc: Jorge Eduardo Candelaria, Graeme Gregory, Laxman Dewangan,
Mark Brown, Liam Girdwood
We actually clear LDO_ST_ON_BIT for standby mode in tps65910_set_mode.
Fix the logic in tps65910_get_mode.
Supply state (EEPROM bits):
ST[1:0] = 00 : Off
ST[1:0] = 01 : On high power (ACTIVE)
ST[1:0] = 10 : Off
ST[1:0] = 11 : On low power (SLEEP)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/tps65910-regulator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 8074d51..33904e7 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -520,7 +520,7 @@ static unsigned int tps65910_get_mode(struct regulator_dev *dev)
if (value < 0)
return value;
- if (value & LDO_ST_ON_BIT)
+ if (!(value & LDO_ST_ON_BIT))
return REGULATOR_MODE_STANDBY;
else if (value & LDO_ST_MODE_BIT)
return REGULATOR_MODE_IDLE;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Fix the logic of tps65910_get_mode
2012-03-12 23:15 [PATCH] regulator: Fix the logic of tps65910_get_mode Axel Lin
@ 2012-03-13 5:28 ` Laxman Dewangan
2012-03-13 23:18 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Laxman Dewangan @ 2012-03-13 5:28 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel@vger.kernel.org, Jorge Eduardo Candelaria,
Graeme Gregory, Mark Brown, Liam Girdwood
On Tuesday 13 March 2012 04:45 AM, Axel Lin wrote:
> We actually clear LDO_ST_ON_BIT for standby mode in tps65910_set_mode.
> Fix the logic in tps65910_get_mode.
>
> Supply state (EEPROM bits):
> ST[1:0] = 00 : Off
> ST[1:0] = 01 : On high power (ACTIVE)
> ST[1:0] = 10 : Off
> ST[1:0] = 11 : On low power (SLEEP)
>
> Signed-off-by: Axel Lin<axel.lin@gmail.com>
> ---
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Fix the logic of tps65910_get_mode
2012-03-12 23:15 [PATCH] regulator: Fix the logic of tps65910_get_mode Axel Lin
2012-03-13 5:28 ` Laxman Dewangan
@ 2012-03-13 23:18 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-03-13 23:18 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Jorge Eduardo Candelaria, Graeme Gregory,
Laxman Dewangan, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 187 bytes --]
On Tue, Mar 13, 2012 at 07:15:27AM +0800, Axel Lin wrote:
> We actually clear LDO_ST_ON_BIT for standby mode in tps65910_set_mode.
> Fix the logic in tps65910_get_mode.
Applied, 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-13 23:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 23:15 [PATCH] regulator: Fix the logic of tps65910_get_mode Axel Lin
2012-03-13 5:28 ` Laxman Dewangan
2012-03-13 23:18 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox