diff mbox series

[v1,04/11] dt-bindings: leds: aw200xx: introduce optional hwen-gpio property

Message ID 20231006160437.15627-5-ddrokosov@salutedevices.com
State New
Headers show
Series leds: aw200xx: several driver updates | expand

Commit Message

Dmitry Rokosov Oct. 6, 2023, 4:04 p.m. UTC
Property 'awinic,hwen-gpio' is optional, it can be used by the board
developer to connect AW200XX LED controller with appropriate poweron
GPIO pad.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
---
 Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Rob Herring Oct. 10, 2023, 2:13 p.m. UTC | #1
On Fri, Oct 06, 2023 at 07:04:30PM +0300, Dmitry Rokosov wrote:
> Property 'awinic,hwen-gpio' is optional, it can be used by the board
> developer to connect AW200XX LED controller with appropriate poweron
> GPIO pad.
> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>  Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> index 73b81f7a7258..e3ad11fc7a84 100644
> --- a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> +++ b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> @@ -41,6 +41,9 @@ properties:
>      description:
>        Leds matrix size
>  
> +  awinic,hwen-gpio:
> +    maxItems: 1

We have standard 'enable-gpios' or 'powerdown-gpios'. Those don't work 
here?

Note that *-gpio is deprecated in favor of *-gpios.


> +
>  patternProperties:
>    "^led@[0-9a-f]+$":
>      type: object
> @@ -90,12 +93,15 @@ additionalProperties: false
>  
>  examples:
>    - |
> +    #include <dt-bindings/gpio/gpio.h>
>      #include <dt-bindings/leds/common.h>
>  
>      i2c {
>          #address-cells = <1>;
>          #size-cells = <0>;
>  
> +        awinic,hwen-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
> +
>          led-controller@3a {
>              compatible = "awinic,aw20036";
>              reg = <0x3a>;
> -- 
> 2.36.0
>
Dmitry Rokosov Oct. 10, 2023, 2:57 p.m. UTC | #2
Hello Rob,

Thank you for the review! Please find my comments below.

On Tue, Oct 10, 2023 at 09:13:32AM -0500, Rob Herring wrote:
> On Fri, Oct 06, 2023 at 07:04:30PM +0300, Dmitry Rokosov wrote:
> > Property 'awinic,hwen-gpio' is optional, it can be used by the board
> > developer to connect AW200XX LED controller with appropriate poweron
> > GPIO pad.
> > 
> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> > ---
> >  Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> > index 73b81f7a7258..e3ad11fc7a84 100644
> > --- a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> > +++ b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> > @@ -41,6 +41,9 @@ properties:
> >      description:
> >        Leds matrix size
> >  
> > +  awinic,hwen-gpio:
> > +    maxItems: 1
> 
> We have standard 'enable-gpios' or 'powerdown-gpios'. Those don't work 
> here?
> 
> Note that *-gpio is deprecated in favor of *-gpios.

Yes, you are absolutely correct. Andy has already addressed this issue
in the driver patchset. I will revise the driver to utilize the current
GPIO API.

> > +
> >  patternProperties:
> >    "^led@[0-9a-f]+$":
> >      type: object
> > @@ -90,12 +93,15 @@ additionalProperties: false
> >  
> >  examples:
> >    - |
> > +    #include <dt-bindings/gpio/gpio.h>
> >      #include <dt-bindings/leds/common.h>
> >  
> >      i2c {
> >          #address-cells = <1>;
> >          #size-cells = <0>;
> >  
> > +        awinic,hwen-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
> > +
> >          led-controller@3a {
> >              compatible = "awinic,aw20036";
> >              reg = <0x3a>;
> > -- 
> > 2.36.0
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
index 73b81f7a7258..e3ad11fc7a84 100644
--- a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
+++ b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
@@ -41,6 +41,9 @@  properties:
     description:
       Leds matrix size
 
+  awinic,hwen-gpio:
+    maxItems: 1
+
 patternProperties:
   "^led@[0-9a-f]+$":
     type: object
@@ -90,12 +93,15 @@  additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/leds/common.h>
 
     i2c {
         #address-cells = <1>;
         #size-cells = <0>;
 
+        awinic,hwen-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
+
         led-controller@3a {
             compatible = "awinic,aw20036";
             reg = <0x3a>;