diff mbox series

dt-bindings: leds: lp50xx: fix LED children names

Message ID 20220624111325.96478-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series dt-bindings: leds: lp50xx: fix LED children names | expand

Commit Message

Krzysztof Kozlowski June 24, 2022, 11:13 a.m. UTC
The lp50xx LEDs expects to have single-color LED children with unit
addresses.  This is required by the driver and provided by existing
DTSes.  Fix the binding to match actual usage.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers")
---
 Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski June 24, 2022, 5:31 p.m. UTC | #1
On 24/06/2022 19:26, Rob Herring wrote:
> On Fri, 24 Jun 2022 13:13:25 +0200, Krzysztof Kozlowski wrote:
>> The lp50xx LEDs expects to have single-color LED children with unit
>> addresses.  This is required by the driver and provided by existing
>> DTSes.  Fix the binding to match actual usage.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers")
>> ---
>>  Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/leds/leds-lp50xx.example.dtb: led-controller@14: multi-led@2:#size-cells:0:0: 0 was expected
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
> 

This is expected and fixed in:
https://lore.kernel.org/all/20220607075247.58048-1-krzysztof.kozlowski@linaro.org/

I did not combine this patch with above patchset because this one is a
fix and might be backported to stable.

Best regards,
Krzysztof
Rob Herring June 27, 2022, 7:14 p.m. UTC | #2
On Fri, 24 Jun 2022 13:13:25 +0200, Krzysztof Kozlowski wrote:
> The lp50xx LEDs expects to have single-color LED children with unit
> addresses.  This is required by the driver and provided by existing
> DTSes.  Fix the binding to match actual usage.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers")
> ---
>  Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Pavel Machek July 17, 2022, 12:50 p.m. UTC | #3
On Fri 2022-06-24 13:13:25, Krzysztof Kozlowski wrote:
> The lp50xx LEDs expects to have single-color LED children with unit
> addresses.  This is required by the driver and provided by existing
> DTSes.  Fix the binding to match actual usage.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx
family of RGB drivers")

Thanks, applied - w/o the fixes tag.

Best regards,
								Pavel
Rob Herring July 18, 2022, 3:18 p.m. UTC | #4
On Fri, Jun 24, 2022 at 5:13 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The lp50xx LEDs expects to have single-color LED children with unit
> addresses.  This is required by the driver and provided by existing
> DTSes.  Fix the binding to match actual usage.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers")
> ---
>  Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
> index f12fe5b53f30..c274a10bbde6 100644
> --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
> @@ -65,8 +65,14 @@ patternProperties:
>            for the child node.  The LED modules can either be used stand alone
>            or grouped into a module bank.
>
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
>      patternProperties:
> -      "(^led-[0-9a-f]$|led)":
> +      "^led@[0-9a-f]+$":

Looks like you forgot to update the example. Now failing with
'unevaluatedProperties' fixed:

/builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.example.dtb:
led-controller@14: multi-led@1: Unevaluated properties are not allowed
('led-0', 'led-1', 'led-2' were unexpected)
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.example.dtb:
led-controller@14: multi-led@2: Unevaluated properties are not allowed
('#size-cells', 'led-6', 'led-7', 'led-8' were unexpected)
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.example.dtb:
led-controller@14: multi-led@2:#size-cells:0:0: 0 was expected
 From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml

Rob
Krzysztof Kozlowski July 19, 2022, 7:34 a.m. UTC | #5
On 18/07/2022 17:18, Rob Herring wrote:
> On Fri, Jun 24, 2022 at 5:13 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> The lp50xx LEDs expects to have single-color LED children with unit
>> addresses.  This is required by the driver and provided by existing
>> DTSes.  Fix the binding to match actual usage.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Fixes: dce1452301e7 ("dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers")
>> ---
>>  Documentation/devicetree/bindings/leds/leds-lp50xx.yaml | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> index f12fe5b53f30..c274a10bbde6 100644
>> --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
>> @@ -65,8 +65,14 @@ patternProperties:
>>            for the child node.  The LED modules can either be used stand alone
>>            or grouped into a module bank.
>>
>> +      '#address-cells':
>> +        const: 1
>> +
>> +      '#size-cells':
>> +        const: 0
>> +
>>      patternProperties:
>> -      "(^led-[0-9a-f]$|led)":
>> +      "^led@[0-9a-f]+$":
> 
> Looks like you forgot to update the example. Now failing with
> 'unevaluatedProperties' fixed:

Yeah, this was fixed in my other patch:
https://lore.kernel.org/all/20220607075247.58048-1-krzysztof.kozlowski@linaro.org/

and I assumed Pavel will also pick it up... It has been waiting for more
than one month.


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
index f12fe5b53f30..c274a10bbde6 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
@@ -65,8 +65,14 @@  patternProperties:
           for the child node.  The LED modules can either be used stand alone
           or grouped into a module bank.
 
+      '#address-cells':
+        const: 1
+
+      '#size-cells':
+        const: 0
+
     patternProperties:
-      "(^led-[0-9a-f]$|led)":
+      "^led@[0-9a-f]+$":
         type: object
         $ref: common.yaml#