Skip to contentSkip to conversation

regulator: palmas: add support for external control of rails

PATCH Applied Laxman Dewangan 4 participants 11 messages Aug 21, 2013 – Sep 6, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 regulator: palmas: add support for external control of rails

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Add support for configuring these rails to be controlled by external control inputs. This is require to configure the rail's control register as well as configuration of resource register.

Provide the external input names through parameter "roof-floor". Updated the DT binding document to details different value of the roof-floor.

---
Changes from V1:
- Fix typos: palams ->palmas
Changes from V2:
- Make roof-floor with optional argument. If no argument then assume NSLEEP control.
Changes from V3:
- Nit changes..
- print warn() if invalid option for roof-floor.
- use siwtch-case for property value checking.

PS: This patch was part of series (3/3)
regulator: palmas: add support for external control of rail
Patch 1/3 and 2/3 is already applied as 1/3 is in the regulator tree and Patch 2/3 is in the mfd tree by Samuel.
This patch (was 3/3) very much depends on the 2/3 for compilation and hence it need to go on same tree as 2/3 to avoid any compilation error.

 .../devicetree/bindings/regulator/palmas-pmic.txt  |   12 +-
 drivers/regulator/palmas-regulator.c               |  164 +++++++++++++++++++-
 2 files changed, 167 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/regulator/palmas-pmic.txt +9 -3
index 875639a..42e6b6b 100644
@@ -26,11 +26,17 @@ Optional nodes:
 
 	       For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP,
 	       smps45, smps457, smps7 depending on variant, smps6, smps[8-9],
-	       smps10_out2, smps10_out1, do[1-9], ldoln, ldousb.
+	       smps10_out2, smps10_out1, ldo[1-9], ldoln, ldousb.
 
 	       Optional sub-node properties:
 	       ti,warm-reset - maintain voltage during warm reset(boolean)
-	       ti,roof-floor - control voltage selection by pin(boolean)
+	       ti,roof-floor - This takes as optional argument on platform supporting
+	       the rail from desired external control. If there is no argument then
+	       it will be assume that it is controlled by NSLEEP pin.
+	       The valid value for external pins are:
+			ENABLE1 then 1,
+			ENABLE2 then 2 or
+			NSLEEP then 3.
 	       ti,mode-sleep - mode to adopt in pmic sleep 0 - off, 1 - auto,
 	       2 - eco, 3 - forced pwm
 	       ti,smps-range - OTP has the wrong range set for the hardware so override
@@ -61,7 +67,7 @@ pmic {
 			regulator-always-on;
 			regulator-boot-on;
 			ti,warm-reset;
-			ti,roof-floor;
+			ti,roof-floor = <1>; /* ENABLE1 control */
 			ti,mode-sleep = <0>;
 			ti,smps-range = <1>;
 		};
drivers/regulator/palmas-regulator.c +158 -6

393 lines not on this page · raw message

Signature · 1 line
1.7.1.1
Acked-by on v4 1/1
#1 lore raw
Quoted 10 lines · Laxman Dewangan

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Add support for configuring these rails to be controlled by external control inputs. This is require to configure the rail's control register as well as configuration of resource register.

Provide the external input names through parameter "roof-floor". Updated the DT binding document to details different value of the roof-floor.

The binding change looks reasonable to me, so that part,

maintainer Acked-by on v4 1/1
#2 lore raw
In reply to Laxman Dewangan
Quoted 3 lines · Laxman Dewangan

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

#3 lore raw

Hi Samuel,

Quoted 8 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 3 lines · Laxman Dewangan

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Can you please take this in your tree as dependent patch is already in your tree?

Thanks,
Laxman

#4 lore raw
Quoted 4 lines · Laxman Dewangan
Quoted 3 lines · Mark Brown

* PGP Signed by an unknown key

On Wed, Aug 21, 2013 at 04:18:16PM +0530, Laxman Dewangan wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Can you please take this in your tree as dependent patch is already in your tree?

It won't go in until v3.12 now, but I have applied the patch.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw
Quoted 5 lines · Lee Jones
Quoted 4 lines · Laxman Dewangan
Quoted 3 lines · Mark Brown

* PGP Signed by an unknown key

On Wed, Aug 21, 2013 at 04:18:16PM +0530, Laxman Dewangan wrote:

Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Can you please take this in your tree as dependent patch is already in your tree?

It won't go in until v3.12 now, but I have applied the patch.

Thanks Lee for taking care.

Thanks,
Laxman

maintainer
#6 lore raw
Quoted 5 lines · Laxman Dewangan
Quoted 1 line · Lee Jones

It won't go in until v3.12 now, but I have applied the patch.

Thanks Lee for taking care.

If it's going to wait for v3.12 there's no point applying it to MFD as the dependency will be in mainline after the merge window.

#7 lore raw
Quoted 8 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 3 lines · Laxman Dewangan
Quoted 1 line · Lee Jones

It won't go in until v3.12 now, but I have applied the patch.

Thanks Lee for taking care.

If it's going to wait for v3.12 there's no point applying it to MFD as the dependency will be in mainline after the merge window.

Agree that it should go on regulator tree if it is v3.12 and if there is any issue on applying the patch, I will resend at that time after rebasing to that branch.

Thanks,
Laxman

A message that is not in the archive (sent off-list or not yet received): CAF2Aj3j23ZvfAjZe82jo+fz_vD4k-HMby+eirYj_havYsy8wZA@mail.gmail.com

maintainer
#9 lore raw
Quoted 1 line · Lee Jones

Would you like to take it instead then Mark?

Yes, now that it's slipped into v3.12 it seems more sensible.

#10 lore raw
In reply to Lee Jones
Quoted 8 lines · Lee Jones
Quoted 7 lines · Laxman Dewangan
Quoted 6 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 3 lines · Laxman Dewangan

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Can you please take this in your tree as dependent patch is already in your tree?

It won't go in until v3.12 now, but I have applied the patch.

Slight change of plan, as the patch won't apply.

Can you rebase on v3.11 please?

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer Applied
#11 lore raw
In reply to Laxman Dewangan
Quoted 3 lines · Laxman Dewangan

Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP.

Applied, thanks.