Skip to contentSkip to conversation

mfd: twl4030-power: support ti,system-power-controller

PATCH Superseded Nishanth Menon 4 participants 8 messages Sep 3, 2014 – Sep 17, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover mfd: twl4030-power: support ti,system-power-controller

This series adds ti,system-power-controller to Documentation and the driver seperately as per maintainer preference.

Based on v3.17-rc1

Nishanth Menon (2):
Documentation: devicetree: mfd: twl4030-power: Use the standard
'ti,system-power-controller' to mark power control
mfd: twl4030-power: use 'ti,system-power-controller' as alternative
way to support system power off

 .../devicetree/bindings/mfd/twl4030-power.txt      |    7 +++++--
 drivers/mfd/twl4030-power.c                        |    3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

---
 .../devicetree/bindings/mfd/twl4030-power.txt      |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/twl4030-power.txt +5 -2
index b9ee7b9..e1dff57 100644
@@ -23,8 +23,11 @@ down during off-idle. Note that this does not work on all boards
 depending on how the external oscillator is wired.
 
 Optional properties:
-- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
-		   SLEEP-to-OFF transition when the system poweroffs.
+
+- ti,system-power-controller OR ti,use_poweroff: This indicates that
+  TWL4030 is the power supply master of the system. With this flag, the
+  chip will initiates an ACTIVE-to-OFF or SLEEP-to-OFF transition when
+  the system poweroffs.
 
 Example:
 &i2c1 {
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 2/2 mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off

In reply to Nishanth Menon

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

---
 drivers/mfd/twl4030-power.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mfd/twl4030-power.c +3 -0
index 3bc969a..1c129ba 100644
@@ -627,6 +627,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
 	if (pdata && pdata->use_poweroff)
 		return true;
 
+	if (of_property_read_bool(node, "ti,system-power-controller"))
+		return true;
+
 	if (of_property_read_bool(node, "ti,use_poweroff"))
 		return true;
 
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

Re: [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control

In reply to Nishanth Menon

Hi,

Quoted 19 lines · Nishanth Menon

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

---
 .../devicetree/bindings/mfd/twl4030-power.txt      |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/twl4030-power.txt +0 -0
index b9ee7b9..e1dff57 100644

Documentation/devicetree/bindings/mfd/twl4030-power.txt down during off-idle. Note that this does not work on all boards · line 30

Quoted 10 lines
Documentation/devicetree/bindings/mfd/twl4030-power.txt +5 -2
@@ -23,8 +23,11 @@ down during off-idle. Note that this does not work on all boards
 depending on how the external oscillator is wired.
 
 Optional properties:
-- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
-		   SLEEP-to-OFF transition when the system poweroffs.
+
+- ti,system-power-controller OR ti,use_poweroff: This indicates that
+  TWL4030 is the power supply master of the system. With this flag, the
+  chip will initiates an ACTIVE-to-OFF or SLEEP-to-OFF transition when
+  the system poweroffs.

I suggest the following wording:

- ti,system-power-controller: This indicates that TWL4030 is the power supply master of the system. With this flag, the chip will initiates an ACTIVE-to-OFF or SLEEP-to-OFF transition when the system poweroffs.

- ti,use_poweroff: Deprecated name for ti,system-power-controller

-- Sebastian

#3 lore raw

Re: [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control

Quoted 11 lines · Sebastian Reichel

Documentation/devicetree/bindings/mfd/twl4030-power.txt down during off-idle. Note that this does not work on all boards · line 30

Quoted 8 lines · Nishanth Menon

Optional properties:
-- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or

Documentation/devicetree/bindings/mfd/twl4030-power.txt +5 -1
-                SLEEP-to-OFF transition when the system poweroffs.
+
+- ti,system-power-controller OR ti,use_poweroff: This indicates that
+  TWL4030 is the power supply master of the system. With this flag, the
+  chip will initiates an ACTIVE-to-OFF or SLEEP-to-OFF transition when
+  the system poweroffs.
Quoted 8 lines

I suggest the following wording:

- ti,system-power-controller: This indicates that TWL4030 is the power supply master of the system. With this flag, the chip will initiates an ACTIVE-to-OFF or SLEEP-to-OFF transition when the system poweroffs.

- ti,use_poweroff: Deprecated name for ti,system-power-controller

Yes, this does indeed sound better. if no one has a different opinion or further comments, will update this patch tomorrow.

Signature · 3 lines
---
Regards,
Nishanth Menon
maintainer Acked-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off

In reply to Nishanth Menon
Quoted 10 lines · Nishanth Menon

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

Quoted 21 lines
---
 drivers/mfd/twl4030-power.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mfd/twl4030-power.c +3 -0
index 3bc969a..1c129ba 100644
@@ -627,6 +627,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
 	if (pdata && pdata->use_poweroff)
 		return true;
 
+	if (of_property_read_bool(node, "ti,system-power-controller"))
+		return true;
+
 	if (of_property_read_bool(node, "ti,use_poweroff"))
 		return true;
 
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off

Quoted 6 lines · Tony Lindgren
Quoted 5 lines · Nishanth Menon

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

Quoted 7 lines
Quoted 5 lines

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

I assume you're going to resend this with the document modifications? When you do, don't forget to apply Tony's Ack, as it will ensure a faster merge.

Quoted 18 lines
Quoted 18 lines
---
 drivers/mfd/twl4030-power.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mfd/twl4030-power.c +3 -0
index 3bc969a..1c129ba 100644
@@ -627,6 +627,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
 	if (pdata && pdata->use_poweroff)
 		return true;
 
+	if (of_property_read_bool(node, "ti,system-power-controller"))
+		return true;
+
 	if (of_property_read_bool(node, "ti,use_poweroff"))
 		return true;
 
Signature · 8 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off

Quoted 12 lines · Lee Jones
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Nishanth Menon

ti,system-power-controller is more or less the standard way of indicating that the PMIC is the system wide power controller and hence may be used to switch off the system. Almost ALL TI PMIC drivers and many Maxim PMIC drivers follow the same style.

So support 'ti,system-power-controller' in addition to the usual 'ti,use_poweroff' to indicate that the PMIC instance has control for switching off the system.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

I assume you're going to resend this with the document modifications? When you do, don't forget to apply Tony's Ack, as it will ensure a faster merge.

Thanks for the reminder, This did indeed slip through the cracks. Posting updated rev in a few mins..

Signature · 2 lines
Regards,
Nishanth Menon