linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mfd: twl4030-power: support ti,system-power-controller
@ 2014-09-03 19:06 Nishanth Menon
  2014-09-03 19:06 ` [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control Nishanth Menon
  2014-09-03 19:06 ` [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off Nishanth Menon
  0 siblings, 2 replies; 8+ messages in thread
From: Nishanth Menon @ 2014-09-03 19:06 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones, Samuel Ortiz
  Cc: linux-omap, devicetree, linux-kernel, Nishanth Menon

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(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control
  2014-09-03 19:06 [PATCH 0/2] mfd: twl4030-power: support ti,system-power-controller Nishanth Menon
@ 2014-09-03 19:06 ` Nishanth Menon
  2014-09-03 19:53   ` Sebastian Reichel
  2014-09-03 19:06 ` [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off Nishanth Menon
  1 sibling, 1 reply; 8+ messages in thread
From: Nishanth Menon @ 2014-09-03 19:06 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones, Samuel Ortiz
  Cc: linux-omap, devicetree, linux-kernel, 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.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 .../devicetree/bindings/mfd/twl4030-power.txt      |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index b9ee7b9..e1dff57 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -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 {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off
  2014-09-03 19:06 [PATCH 0/2] mfd: twl4030-power: support ti,system-power-controller Nishanth Menon
  2014-09-03 19:06 ` [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control Nishanth Menon
@ 2014-09-03 19:06 ` Nishanth Menon
  2014-09-09  0:01   ` Tony Lindgren
  1 sibling, 1 reply; 8+ messages in thread
From: Nishanth Menon @ 2014-09-03 19:06 UTC (permalink / raw)
  To: Tony Lindgren, Lee Jones, Samuel Ortiz
  Cc: linux-omap, devicetree, linux-kernel, 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.

Signed-off-by: Nishanth Menon <nm@ti.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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control
  2014-09-03 19:06 ` [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control Nishanth Menon
@ 2014-09-03 19:53   ` Sebastian Reichel
  2014-09-03 20:31     ` Nishanth Menon
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastian Reichel @ 2014-09-03 19:53 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Tony Lindgren, Lee Jones, Samuel Ortiz, linux-omap, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

Hi,

On Wed, Sep 03, 2014 at 02:06:47PM -0500, 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>
> ---
>  .../devicetree/bindings/mfd/twl4030-power.txt      |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> index b9ee7b9..e1dff57 100644
> --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> @@ -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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control
  2014-09-03 19:53   ` Sebastian Reichel
@ 2014-09-03 20:31     ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2014-09-03 20:31 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Tony Lindgren, Lee Jones, Samuel Ortiz, linux-omap, dt list, lkml

On Wed, Sep 3, 2014 at 2:53 PM, Sebastian Reichel <sre@kernel.org> wrote:
> On Wed, Sep 03, 2014 at 02:06:47PM -0500, Nishanth Menon wrote:

>>  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

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

-- 
---
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off
  2014-09-03 19:06 ` [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off Nishanth Menon
@ 2014-09-09  0:01   ` Tony Lindgren
  2014-09-16 23:05     ` Lee Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2014-09-09  0:01 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Lee Jones, Samuel Ortiz, linux-omap, devicetree, linux-kernel

* 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
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off
  2014-09-09  0:01   ` Tony Lindgren
@ 2014-09-16 23:05     ` Lee Jones
  2014-09-17 12:17       ` Nishanth Menon
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2014-09-16 23:05 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Nishanth Menon, Samuel Ortiz, linux-omap, devicetree, linux-kernel

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;
> >  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off
  2014-09-16 23:05     ` Lee Jones
@ 2014-09-17 12:17       ` Nishanth Menon
  0 siblings, 0 replies; 8+ messages in thread
From: Nishanth Menon @ 2014-09-17 12:17 UTC (permalink / raw)
  To: Lee Jones
  Cc: Tony Lindgren, Samuel Ortiz, linux-omap, devicetree, linux-kernel

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..
-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-17 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 19:06 [PATCH 0/2] mfd: twl4030-power: support ti,system-power-controller Nishanth Menon
2014-09-03 19:06 ` [PATCH 1/2] Documentation: devicetree: mfd: twl4030-power: Use the standard 'ti,system-power-controller' to mark power control Nishanth Menon
2014-09-03 19:53   ` Sebastian Reichel
2014-09-03 20:31     ` Nishanth Menon
2014-09-03 19:06 ` [PATCH 2/2] mfd: twl4030-power: use 'ti,system-power-controller' as alternative way to support system power off Nishanth Menon
2014-09-09  0:01   ` Tony Lindgren
2014-09-16 23:05     ` Lee Jones
2014-09-17 12:17       ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).