Skip to contentSkip to conversation

twl4030-regulator: Remove regulator from all groups when disabling

PATCH Applied Eduardo Valentin 2 participants 5 messages Nov 20, 2009 – Nov 23, 2009 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 twl4030-regulator: Remove regulator from all groups when disabling

Just remove regulator from all groups when disabling. This way we avoid problems if boot loader touches twl4030 registers.

---
 drivers/regulator/twl4030-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/twl4030-regulator.c +1 -1
index e2032fb..27b3115 100644
@@ -126,7 +126,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
 	if (grp < 0)
 		return grp;
 
-	grp &= ~P1_GRP;
+	grp &= ~(P1_GRP & P2_GRP | P3_GRP);
 	return twl4030reg_write(info, VREG_GRP, grp);
 }
 
Signature · 1 line
1.6.5.7.g9ecb2
#1 lore raw
Quoted 13 lines · Valentin Eduardo (Nokia-D/Helsinki)

Just remove regulator from all groups when disabling. This way we avoid problems if boot loader touches twl4030 registers.

---
 drivers/regulator/twl4030-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/twl4030-regulator.c +0 -0
index e2032fb..27b3115 100644

drivers/regulator/twl4030-regulator.c static int twl4030reg_disable(struct regulator_dev *rdev) · line 129

Quoted 5 lines
drivers/regulator/twl4030-regulator.c +1 -1
@@ -126,7 +126,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
 	if (grp < 0)
 		return grp;
 
-	grp &= ~P1_GRP;
+	grp &= ~(P1_GRP & P2_GRP | P3_GRP);
                        ^

This has actually a typo. So please ignore it. I'll resend it.

Quoted 5 lines
drivers/regulator/twl4030-regulator.c +0 -0
 	return twl4030reg_write(info, VREG_GRP, grp);
 }
 
Signature · 1 line
1.6.5.7.g9ecb2
Signature · 1 line
Eduardo Valentin
#2 lore raw
In reply to Eduardo Valentin
Quoted 13 lines · Eduardo Valentin

Just remove regulator from all groups when disabling. This way we avoid problems if boot loader touches twl4030 registers.

---
 drivers/regulator/twl4030-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/twl4030-regulator.c +0 -0
index e2032fb..27b3115 100644

drivers/regulator/twl4030-regulator.c static int twl4030reg_disable(struct regulator_dev *rdev) · line 132

Quoted 8 lines
drivers/regulator/twl4030-regulator.c +1 -1
@@ -126,7 +126,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
 	if (grp < 0)
 		return grp;
 
-	grp &= ~P1_GRP;
+	grp &= ~(P1_GRP & P2_GRP | P3_GRP);
 	return twl4030reg_write(info, VREG_GRP, grp);
 }
 

Applied.

Thanks

Liam

#3 lore raw

Hello Liam,

Quoted 17 lines · ext Liam Girdwood
Quoted 16 lines · Eduardo Valentin

Just remove regulator from all groups when disabling. This way we avoid problems if boot loader touches twl4030 registers.

---
 drivers/regulator/twl4030-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/twl4030-regulator.c +0 -0
index e2032fb..27b3115 100644
@@ -126,7 +126,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
 	if (grp < 0)
 		return grp;
 
Quoted 7 lines

drivers/regulator/twl4030-regulator.c static int twl4030reg_disable(struct regulator_dev *rdev) · line 132

Quoted 5 lines
drivers/regulator/twl4030-regulator.c +1 -1
-	grp &= ~P1_GRP;
+	grp &= ~(P1_GRP & P2_GRP | P3_GRP);
 	return twl4030reg_write(info, VREG_GRP, grp);
 }
 

Applied.

Thanks for applying. But this one has actually a typo It was supposed to be:

+ grp &= ~(P1_GRP | P2_GRP | P3_GRP);

Could you please apply this one instead:
http://lkml.org/lkml/2009/11/20/231

?

Quoted 5 lines

Thanks

Liam

BR,

Signature · 1 line
Eduardo Valentin
#4 lore raw
Quoted 33 lines · Eduardo Valentin

Hello Liam,

Quoted 17 lines · ext Liam Girdwood
Quoted 16 lines · Eduardo Valentin

Just remove regulator from all groups when disabling. This way we avoid problems if boot loader touches twl4030 registers.

---
 drivers/regulator/twl4030-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/twl4030-regulator.c +0 -0
index e2032fb..27b3115 100644
@@ -126,7 +126,7 @@ static int twl4030reg_disable(struct regulator_dev *rdev)
 	if (grp < 0)
 		return grp;
 
Quoted 7 lines

drivers/regulator/twl4030-regulator.c static int twl4030reg_disable(struct regulator_dev *rdev) · line 132

Quoted 5 lines
drivers/regulator/twl4030-regulator.c +1 -1
-	grp &= ~P1_GRP;
+	grp &= ~(P1_GRP & P2_GRP | P3_GRP);
 	return twl4030reg_write(info, VREG_GRP, grp);
 }
 

Applied.

Thanks for applying. But this one has actually a typo It was supposed to be:

(quoted diff) +1 -0
+	grp &= ~(P1_GRP | P2_GRP | P3_GRP);
Quoted 4 lines

Could you please apply this one instead:
http://lkml.org/lkml/2009/11/20/231

?

Ah, I did see the new message but applied the wrong one (they both had the same subject, a V2 subject would have been better).

Applied correct version now.

Thanks

Liam