diff mbox series

[leds] dt-bindings: leds: cznic,turris-omnia-leds: fix error in binding

Message ID 20200915005426.15957-1-marek.behun@nic.cz
State Accepted, archived
Headers show
Series [leds] dt-bindings: leds: cznic,turris-omnia-leds: fix error in binding | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success

Commit Message

Marek Behún Sept. 15, 2020, 12:54 a.m. UTC
There is a bug in the device tree binding for cznic,turris-omnia-leds
which causes make dt_binding_check to complain.

The reason is that the multi-led property binding's regular expression
does not contain the `@` character, while the example nodes do.

Fix this, and also allow for longer address in property name.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: Pavel Machek <pavel@ucw.cz>
---
 .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Herring Sept. 15, 2020, 9:22 p.m. UTC | #1
On Tue, Sep 15, 2020 at 02:54:26AM +0200, Marek Behún wrote:
> There is a bug in the device tree binding for cznic,turris-omnia-leds
> which causes make dt_binding_check to complain.
> 
> The reason is that the multi-led property binding's regular expression
> does not contain the `@` character, while the example nodes do.
> 
> Fix this, and also allow for longer address in property name.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: Pavel Machek <pavel@ucw.cz>
> ---
>  .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml       | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> index 24ad1446445ea..486ab27d75f2f 100644
> --- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> +++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> @@ -30,7 +30,7 @@ properties:
>      const: 0
>  
>  patternProperties:
> -  "^multi-led[0-9a-f]$":
> +  "^multi-led@[0-9a-f]+$":

There are only 12 LEDs on the device based on the description and 'reg', 
so 'b' is the max unit-address.

I can fixup when applying: "^multi-led@[0-9a-b]$"

>      type: object
>      allOf:
>        - $ref: leds-class-multicolor.yaml#
> -- 
> 2.26.2
>
Marek Behún Sept. 15, 2020, 11:41 p.m. UTC | #2
On Tue, 15 Sep 2020 15:22:58 -0600
Rob Herring <robh@kernel.org> wrote:

> On Tue, Sep 15, 2020 at 02:54:26AM +0200, Marek Behún wrote:
> > There is a bug in the device tree binding for cznic,turris-omnia-leds
> > which causes make dt_binding_check to complain.
> > 
> > The reason is that the multi-led property binding's regular expression
> > does not contain the `@` character, while the example nodes do.
> > 
> > Fix this, and also allow for longer address in property name.
> > 
> > Signed-off-by: Marek Behún <marek.behun@nic.cz>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: devicetree@vger.kernel.org
> > Cc: Pavel Machek <pavel@ucw.cz>
> > ---
> >  .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml       | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > index 24ad1446445ea..486ab27d75f2f 100644
> > --- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > +++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
> > @@ -30,7 +30,7 @@ properties:
> >      const: 0
> >  
> >  patternProperties:
> > -  "^multi-led[0-9a-f]$":
> > +  "^multi-led@[0-9a-f]+$":  
> 
> There are only 12 LEDs on the device based on the description and 'reg', 
> so 'b' is the max unit-address.
> 
> I can fixup when applying: "^multi-led@[0-9a-b]$"
> 
Please do, thanks.

Marek
Rob Herring Sept. 16, 2020, 3:02 a.m. UTC | #3
On Tue, 15 Sep 2020 02:54:26 +0200, Marek Behún wrote:
> There is a bug in the device tree binding for cznic,turris-omnia-leds
> which causes make dt_binding_check to complain.
> 
> The reason is that the multi-led property binding's regular expression
> does not contain the `@` character, while the example nodes do.
> 
> Fix this, and also allow for longer address in property name.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: Pavel Machek <pavel@ucw.cz>
> ---
>  .../devicetree/bindings/leds/cznic,turris-omnia-leds.yaml       | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
index 24ad1446445ea..486ab27d75f2f 100644
--- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
+++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
@@ -30,7 +30,7 @@  properties:
     const: 0
 
 patternProperties:
-  "^multi-led[0-9a-f]$":
+  "^multi-led@[0-9a-f]+$":
     type: object
     allOf:
       - $ref: leds-class-multicolor.yaml#