diff mbox

[1/2] dt-bindings: add disable-wakeup property for gpio-charger

Message ID 1423555945-24289-2-git-send-email-zyw@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Zhong Feb. 10, 2015, 8:12 a.m. UTC
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(+)

Comments

Mark Rutland Feb. 10, 2015, noon UTC | #1
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
> 
>
Heiko Stuebner Feb. 10, 2015, 12:14 p.m. UTC | #2
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.


Heiko
Mark Rutland Feb. 10, 2015, 12:33 p.m. UTC | #3
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.
diff mbox

Patch

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 {