* [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
@ 2022-06-24 11:21 Krzysztof Kozlowski
2022-06-30 22:27 ` Rob Herring
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-24 11:21 UTC (permalink / raw)
To: Marek Behún, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Dan Murphy, Sven Schwermer, Bjorn Andersson, linux-leds,
devicetree, linux-kernel
Cc: ChiaEn Wu, Krzysztof Kozlowski
The leds/common.yaml is referenced directly in each LED node, which
leads to people doing the same with leds/leds-class-multicolor.yaml.
This is not correct because leds-class-multicolor.yaml defined multi-led
property and its children. Some schemas implemented this incorrect.
Rework this to match same behavior common.yaml, so expect the multi-led
node to reference the leds-class-multicolor.yaml. Fixing allows to add
unevaluatedProperties:false.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This will conflict with any new users of leds-class-multicolor, e.g.:
https://lore.kernel.org/all/20220623115631.22209-4-peterwu.pub@gmail.com/
The new users should be updated to match the usage introduced here.
---
.../leds/cznic,turris-omnia-leds.yaml | 2 ++
.../bindings/leds/leds-class-multicolor.yaml | 32 +++++++++----------
.../devicetree/bindings/leds/leds-lp50xx.yaml | 2 ++
.../bindings/leds/leds-pwm-multicolor.yaml | 5 ++-
.../bindings/leds/leds-qcom-lpg.yaml | 2 ++
5 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
index 9362b1ef9e88..14bebe1ad8f8 100644
--- a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
+++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
@@ -33,6 +33,8 @@ patternProperties:
"^multi-led@[0-9a-b]$":
type: object
$ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+
description:
This node represents one of the RGB LED devices on Turris Omnia.
No subnodes need to be added for subchannels since this controller only
diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
index f41d021ed677..12693483231f 100644
--- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
@@ -19,22 +19,22 @@ description: |
LED class. Common LED nodes and properties are inherited from the common.yaml
within this documentation directory.
-patternProperties:
- "^multi-led(@[0-9a-f])?$":
- type: object
- description: Represents the LEDs that are to be grouped.
- properties:
- color:
- description: |
- For multicolor LED support this property should be defined as either
- LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
- include/linux/leds/common.h.
- enum: [ 8, 9 ]
-
- $ref: "common.yaml#"
-
- required:
- - color
+properties:
+ $nodename:
+ pattern: "^multi-led(@[0-9a-f])?$"
+
+ color:
+ description: |
+ For multicolor LED support this property should be defined as either
+ LED_COLOR_ID_RGB or LED_COLOR_ID_MULTI which can be found in
+ include/linux/leds/common.h.
+ enum: [ 8, 9 ]
+
+required:
+ - color
+
+allOf:
+ - $ref: "common.yaml#"
additionalProperties: true
diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
index d11898567313..d44bf48b3c2f 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
@@ -56,6 +56,8 @@ patternProperties:
'^multi-led@[0-9a-f]$':
type: object
$ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+
properties:
reg:
minItems: 1
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
index fdaf04e03a8d..e9fdecdaf84d 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
@@ -19,6 +19,8 @@ properties:
multi-led:
type: object
+ $ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
patternProperties:
"^led-[0-9a-z]+$":
@@ -42,9 +44,6 @@ properties:
required:
- compatible
-allOf:
- - $ref: leds-class-multicolor.yaml#
-
additionalProperties: false
examples:
diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 409a4c7298e1..fe336fa16518 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -58,6 +58,8 @@ properties:
multi-led:
type: object
$ref: leds-class-multicolor.yaml#
+ unevaluatedProperties: false
+
properties:
"#address-cells":
const: 1
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
2022-06-24 11:21 [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node Krzysztof Kozlowski
@ 2022-06-30 22:27 ` Rob Herring
2022-07-05 11:52 ` Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2022-06-30 22:27 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Bjorn Andersson, linux-leds, linux-kernel, devicetree,
Sven Schwermer, Marek Behún, Rob Herring,
Krzysztof Kozlowski, ChiaEn Wu, Pavel Machek, Dan Murphy
On Fri, 24 Jun 2022 13:21:06 +0200, Krzysztof Kozlowski wrote:
> The leds/common.yaml is referenced directly in each LED node, which
> leads to people doing the same with leds/leds-class-multicolor.yaml.
> This is not correct because leds-class-multicolor.yaml defined multi-led
> property and its children. Some schemas implemented this incorrect.
>
> Rework this to match same behavior common.yaml, so expect the multi-led
> node to reference the leds-class-multicolor.yaml. Fixing allows to add
> unevaluatedProperties:false.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> This will conflict with any new users of leds-class-multicolor, e.g.:
> https://lore.kernel.org/all/20220623115631.22209-4-peterwu.pub@gmail.com/
>
> The new users should be updated to match the usage introduced here.
> ---
> .../leds/cznic,turris-omnia-leds.yaml | 2 ++
> .../bindings/leds/leds-class-multicolor.yaml | 32 +++++++++----------
> .../devicetree/bindings/leds/leds-lp50xx.yaml | 2 ++
> .../bindings/leds/leds-pwm-multicolor.yaml | 5 ++-
> .../bindings/leds/leds-qcom-lpg.yaml | 2 ++
> 5 files changed, 24 insertions(+), 19 deletions(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
2022-06-24 11:21 [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node Krzysztof Kozlowski
2022-06-30 22:27 ` Rob Herring
@ 2022-07-05 11:52 ` Krzysztof Kozlowski
2022-07-17 12:44 ` Pavel Machek
2022-07-18 15:22 ` Rob Herring
3 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-05 11:52 UTC (permalink / raw)
To: Pavel Machek, Krzysztof Kozlowski, linux-leds, devicetree, linux-kernel
Cc: ChiaEn Wu, Sven Schwermer, Rob Herring, Bjorn Andersson,
Dan Murphy, Marek Behún
On 24/06/2022 13:21, Krzysztof Kozlowski wrote:
> The leds/common.yaml is referenced directly in each LED node, which
> leads to people doing the same with leds/leds-class-multicolor.yaml.
> This is not correct because leds-class-multicolor.yaml defined multi-led
> property and its children. Some schemas implemented this incorrect.
>
> Rework this to match same behavior common.yaml, so expect the multi-led
> node to reference the leds-class-multicolor.yaml. Fixing allows to add
> unevaluatedProperties:false.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> This will conflict with any new users of leds-class-multicolor, e.g.:
> https://lore.kernel.org/all/20220623115631.22209-4-peterwu.pub@gmail.com/
>
> The new users should be updated to match the usage introduced here.
Pavel,
Any comments from your side? It's waiting for a bit and folks are
sending more and more wrong multicolor bindings...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
2022-06-24 11:21 [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node Krzysztof Kozlowski
2022-06-30 22:27 ` Rob Herring
2022-07-05 11:52 ` Krzysztof Kozlowski
@ 2022-07-17 12:44 ` Pavel Machek
2022-07-18 15:22 ` Rob Herring
3 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2022-07-17 12:44 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Marek Behún, Rob Herring, Krzysztof Kozlowski, Dan Murphy,
Sven Schwermer, Bjorn Andersson, linux-leds, devicetree,
linux-kernel, ChiaEn Wu
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
Hi!
> The leds/common.yaml is referenced directly in each LED node, which
> leads to people doing the same with leds/leds-class-multicolor.yaml.
> This is not correct because leds-class-multicolor.yaml defined multi-led
> property and its children. Some schemas implemented this incorrect.
>
> Rework this to match same behavior common.yaml, so expect the multi-led
> node to reference the leds-class-multicolor.yaml. Fixing allows to add
> unevaluatedProperties:false.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thanks, applied.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
2022-06-24 11:21 [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node Krzysztof Kozlowski
` (2 preceding siblings ...)
2022-07-17 12:44 ` Pavel Machek
@ 2022-07-18 15:22 ` Rob Herring
2022-07-19 7:41 ` Krzysztof Kozlowski
3 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2022-07-18 15:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Marek Behún, Pavel Machek, Krzysztof Kozlowski, Dan Murphy,
Sven Schwermer, Bjorn Andersson, Linux LED Subsystem, devicetree,
linux-kernel, ChiaEn Wu
On Fri, Jun 24, 2022 at 5:21 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The leds/common.yaml is referenced directly in each LED node, which
> leads to people doing the same with leds/leds-class-multicolor.yaml.
> This is not correct because leds-class-multicolor.yaml defined multi-led
> property and its children. Some schemas implemented this incorrect.
>
> Rework this to match same behavior common.yaml, so expect the multi-led
> node to reference the leds-class-multicolor.yaml. Fixing allows to add
> unevaluatedProperties:false.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> This will conflict with any new users of leds-class-multicolor, e.g.:
> https://lore.kernel.org/all/20220623115631.22209-4-peterwu.pub@gmail.com/
>
> The new users should be updated to match the usage introduced here.
> ---
> .../leds/cznic,turris-omnia-leds.yaml | 2 ++
> .../bindings/leds/leds-class-multicolor.yaml | 32 +++++++++----------
> .../devicetree/bindings/leds/leds-lp50xx.yaml | 2 ++
> .../bindings/leds/leds-pwm-multicolor.yaml | 5 ++-
> .../bindings/leds/leds-qcom-lpg.yaml | 2 ++
> 5 files changed, 24 insertions(+), 19 deletions(-)
Looks like this introduced a new warning:
/builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.example.dtb:
led-controller: multi-led: Unevaluated properties are not allowed
('max-brightness' was unexpected)
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node
2022-07-18 15:22 ` Rob Herring
@ 2022-07-19 7:41 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-19 7:41 UTC (permalink / raw)
To: Rob Herring
Cc: Marek Behún, Pavel Machek, Krzysztof Kozlowski, Dan Murphy,
Sven Schwermer, Bjorn Andersson, Linux LED Subsystem, devicetree,
linux-kernel, ChiaEn Wu
On 18/07/2022 17:22, Rob Herring wrote:
> On Fri, Jun 24, 2022 at 5:21 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> The leds/common.yaml is referenced directly in each LED node, which
>> leads to people doing the same with leds/leds-class-multicolor.yaml.
>> This is not correct because leds-class-multicolor.yaml defined multi-led
>> property and its children. Some schemas implemented this incorrect.
>>
>> Rework this to match same behavior common.yaml, so expect the multi-led
>> node to reference the leds-class-multicolor.yaml. Fixing allows to add
>> unevaluatedProperties:false.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> This will conflict with any new users of leds-class-multicolor, e.g.:
>> https://lore.kernel.org/all/20220623115631.22209-4-peterwu.pub@gmail.com/
>>
>> The new users should be updated to match the usage introduced here.
>> ---
>> .../leds/cznic,turris-omnia-leds.yaml | 2 ++
>> .../bindings/leds/leds-class-multicolor.yaml | 32 +++++++++----------
>> .../devicetree/bindings/leds/leds-lp50xx.yaml | 2 ++
>> .../bindings/leds/leds-pwm-multicolor.yaml | 5 ++-
>> .../bindings/leds/leds-qcom-lpg.yaml | 2 ++
>> 5 files changed, 24 insertions(+), 19 deletions(-)
>
> Looks like this introduced a new warning:
>
I'll fix it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-19 7:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 11:21 [PATCH] dt-bindings: leds: class-multicolor: reference class directly in multi-led node Krzysztof Kozlowski
2022-06-30 22:27 ` Rob Herring
2022-07-05 11:52 ` Krzysztof Kozlowski
2022-07-17 12:44 ` Pavel Machek
2022-07-18 15:22 ` Rob Herring
2022-07-19 7:41 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).