diff mbox

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

Message ID 1410957252-764-3-git-send-email-nm@ti.com
State Accepted
Commit fecc4452b9b3f4bbab41c1b7583a72066ee0c77c
Headers show

Commit Message

Nishanth Menon Sept. 17, 2014, 12:34 p.m. UTC
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.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---

V2: no change, picked up Tony's ack.
V1: https://patchwork.kernel.org/patch/4836371/
 drivers/mfd/twl4030-power.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Lee Jones Sept. 17, 2014, 9:39 p.m. UTC | #1
On Wed, 17 Sep 2014, Nishanth Menon wrote:

> 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.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> 
> V2: no change, picked up Tony's ack.
> V1: https://patchwork.kernel.org/patch/4836371/
>  drivers/mfd/twl4030-power.c |    3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 3bc969a..1c129ba 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -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;
>
diff mbox

Patch

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 3bc969a..1c129ba 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -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;