diff mbox

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

Message ID 1409771208-21867-3-git-send-email-nm@ti.com
State Superseded
Headers show

Commit Message

Nishanth Menon Sept. 3, 2014, 7:06 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>
---
 drivers/mfd/twl4030-power.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Tony Lindgren Sept. 9, 2014, 12:01 a.m. UTC | #1
* Nishanth Menon <nm@ti.com> [140903 12:07]:
> 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>

> ---
>  drivers/mfd/twl4030-power.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> 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;
>  
> -- 
> 1.7.9.5
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones Sept. 16, 2014, 11:05 p.m. UTC | #2
On Mon, 08 Sep 2014, Tony Lindgren wrote:

> * Nishanth Menon <nm@ti.com> [140903 12:07]:
> > 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>

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.

> > ---
> >  drivers/mfd/twl4030-power.c |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > 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;
> >
Nishanth Menon Sept. 17, 2014, 12:17 p.m. UTC | #3
On 16:05-20140916, Lee Jones wrote:
> On Mon, 08 Sep 2014, Tony Lindgren wrote:
> 
> > * Nishanth Menon <nm@ti.com> [140903 12:07]:
> > > 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>
> 
> 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..
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;