devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Support disable the wakeup event of gpio-charger
@ 2015-02-10  8:12 Chris Zhong
  2015-02-10  8:12 ` [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger Chris Zhong
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Zhong @ 2015-02-10  8:12 UTC (permalink / raw)
  To: heiko, dianders, dtor, djkurtz, sonnyrao
  Cc: linux-rockchip, Chris Zhong, devicetree, linux-pm, Kumar Gala,
	linux-kernel, Ian Campbell, Sebastian Reichel,
	Dmitry Eremin-Solenikov, Rob Herring, Heiko Stuebner,
	David Woodhouse, Pawel Moll, Mark Rutland

If you needn't the wakeup event of gpio-charger, this patch can help.
Please set "gpio-charger,disable-wakeup" in gpio-charger node.


Chris Zhong (2):
  dt-bindings: add disable-wakeup property for gpio-charger
  power: gpio-charger: support disable the wakeup event

 Documentation/devicetree/bindings/power_supply/gpio-charger.txt | 2 ++
 drivers/power/gpio-charger.c                                    | 5 ++++-
 include/linux/power/gpio-charger.h                              | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

-- 
1.9.1

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

* [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger
  2015-02-10  8:12 [PATCH 0/2] Support disable the wakeup event of gpio-charger Chris Zhong
@ 2015-02-10  8:12 ` Chris Zhong
  2015-02-10 12:00   ` Mark Rutland
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Zhong @ 2015-02-10  8:12 UTC (permalink / raw)
  To: heiko, dianders, dtor, djkurtz, sonnyrao
  Cc: linux-rockchip, Chris Zhong, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Heiko Stuebner,
	devicetree, linux-kernel

add disable-wakeup for gpio-charger, if you set this property, system
will not wakeup by gpio-charger.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---

 Documentation/devicetree/bindings/power_supply/gpio-charger.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
index adbb5dc..a46e9bc 100644
--- a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
+++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
@@ -4,6 +4,7 @@ Required properties :
  - compatible : "gpio-charger"
  - gpios : GPIO indicating the charger presence.
    See GPIO binding in bindings/gpio/gpio.txt .
+ - gpio-charger,disable-wakeup : Boolean, charger does not wake-up the system.
  - charger-type : power supply type, one of
      unknown
      battery
@@ -20,6 +21,7 @@ Example:
 		compatible = "gpio-charger";
 		charger-type = "usb-sdp";
 		gpios = <&gpf0 2 0 0 0>;
+		gpio-charger,disable-wakeup;
 	}
 
 	battery {
-- 
1.9.1

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

* Re: [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger
  2015-02-10  8:12 ` [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger Chris Zhong
@ 2015-02-10 12:00   ` Mark Rutland
  2015-02-10 12:14     ` Heiko Stübner
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2015-02-10 12:00 UTC (permalink / raw)
  To: Chris Zhong
  Cc: heiko@sntech.de, dianders@chromium.org, dtor@chromium.org,
	djkurtz@chromium.org, sonnyrao@chromium.org,
	linux-rockchip@lists.infradead.org, Rob Herring, Pawel Moll,
	Ian Campbell, Kumar Gala, Heiko Stuebner,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org

On Tue, Feb 10, 2015 at 08:12:24AM +0000, Chris Zhong wrote:
> add disable-wakeup for gpio-charger, if you set this property, system
> will not wakeup by gpio-charger.
> 
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> ---
> 
>  Documentation/devicetree/bindings/power_supply/gpio-charger.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> index adbb5dc..a46e9bc 100644
> --- a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> +++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> @@ -4,6 +4,7 @@ Required properties :
>   - compatible : "gpio-charger"
>   - gpios : GPIO indicating the charger presence.
>     See GPIO binding in bindings/gpio/gpio.txt .
> + - gpio-charger,disable-wakeup : Boolean, charger does not wake-up the system.

When would the system wake up otherwise?

Also, "gpio-charger" is not a vendor prefix.

Mark.

>   - charger-type : power supply type, one of
>       unknown
>       battery
> @@ -20,6 +21,7 @@ Example:
>  		compatible = "gpio-charger";
>  		charger-type = "usb-sdp";
>  		gpios = <&gpf0 2 0 0 0>;
> +		gpio-charger,disable-wakeup;
>  	}
>  
>  	battery {
> -- 
> 1.9.1
> 
> 

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

* Re: [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger
  2015-02-10 12:00   ` Mark Rutland
@ 2015-02-10 12:14     ` Heiko Stübner
  2015-02-10 12:33       ` Mark Rutland
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Stübner @ 2015-02-10 12:14 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Chris Zhong, dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	dtor-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	sonnyrao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Rob Herring, Pawel Moll, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Am Dienstag, 10. Februar 2015, 12:00:30 schrieb Mark Rutland:
> On Tue, Feb 10, 2015 at 08:12:24AM +0000, Chris Zhong wrote:
> > add disable-wakeup for gpio-charger, if you set this property, system
> > will not wakeup by gpio-charger.
> > 
> > Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> > ---
> > 
> >  Documentation/devicetree/bindings/power_supply/gpio-charger.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt index
> > adbb5dc..a46e9bc 100644
> > --- a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > +++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > 
> > @@ -4,6 +4,7 @@ Required properties :
> >   - compatible : "gpio-charger"
> >   - gpios : GPIO indicating the charger presence.
> >   
> >     See GPIO binding in bindings/gpio/gpio.txt .
> > 
> > + - gpio-charger,disable-wakeup : Boolean, charger does not wake-up the
> > system.
> When would the system wake up otherwise?

a response for patch 2/2 suggested to move this to userspace (as deciding if 
the charger should be a wakeup source is not a hardware property) and Chris 
responded that he'll try to move it as suggested.


Heiko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger
  2015-02-10 12:14     ` Heiko Stübner
@ 2015-02-10 12:33       ` Mark Rutland
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Rutland @ 2015-02-10 12:33 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Chris Zhong, dianders@chromium.org, dtor@chromium.org,
	djkurtz@chromium.org, sonnyrao@chromium.org,
	linux-rockchip@lists.infradead.org, Rob Herring, Pawel Moll,
	Ian Campbell, Kumar Gala, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Tue, Feb 10, 2015 at 12:14:48PM +0000, Heiko Stübner wrote:
> Am Dienstag, 10. Februar 2015, 12:00:30 schrieb Mark Rutland:
> > On Tue, Feb 10, 2015 at 08:12:24AM +0000, Chris Zhong wrote:
> > > add disable-wakeup for gpio-charger, if you set this property, system
> > > will not wakeup by gpio-charger.
> > > 
> > > Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> > > ---
> > > 
> > >  Documentation/devicetree/bindings/power_supply/gpio-charger.txt | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git
> > > a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > > b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt index
> > > adbb5dc..a46e9bc 100644
> > > --- a/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > > +++ b/Documentation/devicetree/bindings/power_supply/gpio-charger.txt
> > > 
> > > @@ -4,6 +4,7 @@ Required properties :
> > >   - compatible : "gpio-charger"
> > >   - gpios : GPIO indicating the charger presence.
> > >   
> > >     See GPIO binding in bindings/gpio/gpio.txt .
> > > 
> > > + - gpio-charger,disable-wakeup : Boolean, charger does not wake-up the
> > > system.
> > When would the system wake up otherwise?
> 
> a response for patch 2/2 suggested to move this to userspace (as deciding if 
> the charger should be a wakeup source is not a hardware property) and Chris 
> responded that he'll try to move it as suggested.

Great, that matches what I was thinking.

Thanks for taking the time to say this on the DT patch. 

Getting part of a series makes review far more painful :(

Thanks,
Mark.

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

end of thread, other threads:[~2015-02-10 12:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10  8:12 [PATCH 0/2] Support disable the wakeup event of gpio-charger Chris Zhong
2015-02-10  8:12 ` [PATCH 1/2] dt-bindings: add disable-wakeup property for gpio-charger Chris Zhong
2015-02-10 12:00   ` Mark Rutland
2015-02-10 12:14     ` Heiko Stübner
2015-02-10 12:33       ` Mark Rutland

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