diff mbox series

[v2,03/11] dt-bindings: leds: aw200xx: introduce optional hwen-gpios property

Message ID 20231018182943.18700-4-ddrokosov@salutedevices.com
State Superseded
Headers show
Series leds: aw200xx: several driver updates | expand

Commit Message

Dmitry Rokosov Oct. 18, 2023, 6:29 p.m. UTC
Property 'hwen-gpios' 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 | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Conor Dooley Oct. 19, 2023, 2:11 p.m. UTC | #1
On Wed, Oct 18, 2023 at 09:29:35PM +0300, Dmitry Rokosov wrote:
> Property 'hwen-gpios' is optional, it can be used by the board
> developer to connect AW200XX LED controller with appropriate poweron
> GPIO pad.

If the pad is called "poweron", why is the property called "hwen"?

> 
> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
> ---
>  Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> index feb5febaf361..255eb0563737 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
>  
> +  hwen-gpios:
> +    maxItems: 1
> +
>  patternProperties:
>    "^led@[0-9a-f]$":
>      type: object
> @@ -90,6 +93,7 @@ additionalProperties: false
>  
>  examples:
>    - |
> +    #include <dt-bindings/gpio/gpio.h>
>      #include <dt-bindings/leds/common.h>
>  
>      i2c {
> @@ -102,6 +106,7 @@ examples:
>              #address-cells = <1>;
>              #size-cells = <0>;
>              awinic,display-rows = <3>;
> +            hwen-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
>  
>              led@0 {
>                  reg = <0x0>;
> -- 
> 2.36.0
>
Dmitry Rokosov Oct. 24, 2023, 6:52 p.m. UTC | #2
On Tue, Oct 24, 2023 at 01:30:14PM -0500, Rob Herring wrote:
> On Wed, Oct 18, 2023 at 09:29:35PM +0300, Dmitry Rokosov wrote:
> > Property 'hwen-gpios' 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 | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
> > index feb5febaf361..255eb0563737 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
> >  
> > +  hwen-gpios:
> > +    maxItems: 1
> 
> The standard enable-gpios or powerdown-gpios don't work for you?

HWEN is the name from the official datasheet. I thought it's always
better to use a naming convention that is similar to the notations used
in the datasheet.
Krzysztof Kozlowski Oct. 25, 2023, 7:58 a.m. UTC | #3
On 24/10/2023 20:52, Dmitry Rokosov wrote:
> On Tue, Oct 24, 2023 at 01:30:14PM -0500, Rob Herring wrote:
>> On Wed, Oct 18, 2023 at 09:29:35PM +0300, Dmitry Rokosov wrote:
>>> Property 'hwen-gpios' 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 | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
>>> index feb5febaf361..255eb0563737 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
>>>  
>>> +  hwen-gpios:
>>> +    maxItems: 1
>>
>> The standard enable-gpios or powerdown-gpios don't work for you?
> 
> HWEN is the name from the official datasheet. I thought it's always
> better to use a naming convention that is similar to the notations used
> in the datasheet.

I think we have such rule only for supplies, otherwise you will have
multiple variants of the same reset/enable/powerdown-gpios.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml
index feb5febaf361..255eb0563737 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
 
+  hwen-gpios:
+    maxItems: 1
+
 patternProperties:
   "^led@[0-9a-f]$":
     type: object
@@ -90,6 +93,7 @@  additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/leds/common.h>
 
     i2c {
@@ -102,6 +106,7 @@  examples:
             #address-cells = <1>;
             #size-cells = <0>;
             awinic,display-rows = <3>;
+            hwen-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
 
             led@0 {
                 reg = <0x0>;