* [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example
@ 2022-06-07 7:52 Krzysztof Kozlowski
2022-06-07 7:52 ` [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
2022-06-20 16:04 ` [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-07 7:52 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Dan Murphy,
Jacek Anaszewski, Sven Schwermer, linux-leds, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski, Rob Herring, Kyle Swenson
The multi-led node defined address/size cells, so it is intended to have
children with unit addresses.
The second multi-led's reg property defined three LED indexes within one
reg item, which is not correct - these are three separate items.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes since v2:
1. Minor grammar change in commit msg.
2. Add Rb tag.
Changes since v1:
1. Correct multi-led unit address as well (Rob).
Cc: Kyle Swenson <kyle.swenson@est.tech>
---
.../devicetree/bindings/leds/leds-lp50xx.yaml | 24 ++++++++++++-------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
index f12fe5b53f30..29ce0cb7d449 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
@@ -99,35 +99,41 @@ examples:
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_CHARGING;
- led-0 {
+ led@0 {
+ reg = <0x0>;
color = <LED_COLOR_ID_RED>;
};
- led-1 {
+ led@1 {
+ reg = <0x1>;
color = <LED_COLOR_ID_GREEN>;
};
- led-2 {
+ led@2 {
+ reg = <0x2>;
color = <LED_COLOR_ID_BLUE>;
};
};
- multi-led@2 {
+ multi-led@3 {
#address-cells = <1>;
- #size-cells = <2>;
- reg = <0x2 0x3 0x5>;
+ #size-cells = <0>;
+ reg = <0x3>, <0x4>, <0x5>;
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_STANDBY;
- led-6 {
+ led@3 {
+ reg = <0x3>;
color = <LED_COLOR_ID_RED>;
};
- led-7 {
+ led@4 {
+ reg = <0x4>;
color = <LED_COLOR_ID_GREEN>;
};
- led-8 {
+ led@5 {
+ reg = <0x5>;
color = <LED_COLOR_ID_BLUE>;
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples
2022-06-07 7:52 [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
@ 2022-06-07 7:52 ` Krzysztof Kozlowski
2022-07-19 7:37 ` Krzysztof Kozlowski
2022-07-21 17:10 ` Rob Herring
2022-06-20 16:04 ` [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
1 sibling, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-07 7:52 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Dan Murphy,
Jacek Anaszewski, Sven Schwermer, linux-leds, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski, Rob Herring, Kyle Swenson
The examples were mixing 4-space with 2- and 3-space indentations, so
correct them to use 4-space one. No functional change.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes since v2:
1. Add Rb tag.
Changes since v1:
1. None
Cc: Kyle Swenson <kyle.swenson@est.tech>
---
.../devicetree/bindings/leds/leds-lp50xx.yaml | 110 ++++-----
.../devicetree/bindings/leds/leds-lp55xx.yaml | 222 +++++++++---------
.../bindings/leds/leds-pwm-multicolor.yaml | 36 +--
3 files changed, 184 insertions(+), 184 deletions(-)
diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
index 29ce0cb7d449..d11898567313 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml
@@ -78,66 +78,66 @@ additionalProperties: false
examples:
- |
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/leds/common.h>
-
- i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- led-controller@14 {
- compatible = "ti,lp5009";
- reg = <0x14>;
- #address-cells = <1>;
- #size-cells = <0>;
- enable-gpios = <&gpio1 16>;
-
- multi-led@1 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x1>;
- color = <LED_COLOR_ID_RGB>;
- function = LED_FUNCTION_CHARGING;
-
- led@0 {
- reg = <0x0>;
- color = <LED_COLOR_ID_RED>;
- };
-
- led@1 {
- reg = <0x1>;
- color = <LED_COLOR_ID_GREEN>;
- };
-
- led@2 {
- reg = <0x2>;
- color = <LED_COLOR_ID_BLUE>;
- };
- };
-
- multi-led@3 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x3>, <0x4>, <0x5>;
- color = <LED_COLOR_ID_RGB>;
- function = LED_FUNCTION_STANDBY;
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
- led@3 {
- reg = <0x3>;
- color = <LED_COLOR_ID_RED>;
- };
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
- led@4 {
- reg = <0x4>;
- color = <LED_COLOR_ID_GREEN>;
+ led-controller@14 {
+ compatible = "ti,lp5009";
+ reg = <0x14>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ enable-gpios = <&gpio1 16>;
+
+ multi-led@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_CHARGING;
+
+ led@0 {
+ reg = <0x0>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@1 {
+ reg = <0x1>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@2 {
+ reg = <0x2>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
};
- led@5 {
- reg = <0x5>;
- color = <LED_COLOR_ID_BLUE>;
+ multi-led@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x3>, <0x4>, <0x5>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STANDBY;
+
+ led@3 {
+ reg = <0x3>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led@4 {
+ reg = <0x4>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@5 {
+ reg = <0x5>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
};
- };
- };
+ };
};
...
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
index f552cd143d5b..7ec676e53851 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.yaml
@@ -108,119 +108,119 @@ additionalProperties: false
examples:
- |
- #include <dt-bindings/leds/common.h>
-
- i2c {
- #address-cells = <1>;
- #size-cells = <0>;
-
- led-controller@32 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "ti,lp8501";
- reg = <0x32>;
- clock-mode = /bits/ 8 <2>;
- pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
-
- led@0 {
- reg = <0>;
- chan-name = "d1";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@1 {
- reg = <1>;
- chan-name = "d2";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@2 {
- reg = <2>;
- chan-name = "d3";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@3 {
- reg = <3>;
- chan-name = "d4";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@4 {
- reg = <4>;
- chan-name = "d5";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@5 {
- reg = <5>;
- chan-name = "d6";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@6 {
- reg = <6>;
- chan-name = "d7";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@7 {
- reg = <7>;
- chan-name = "d8";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
-
- led@8 {
- reg = <8>;
- chan-name = "d9";
- led-cur = /bits/ 8 <0x14>;
- max-cur = /bits/ 8 <0x20>;
- };
+ #include <dt-bindings/leds/common.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@32 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "ti,lp8501";
+ reg = <0x32>;
+ clock-mode = /bits/ 8 <2>;
+ pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
+
+ led@0 {
+ reg = <0>;
+ chan-name = "d1";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@1 {
+ reg = <1>;
+ chan-name = "d2";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@2 {
+ reg = <2>;
+ chan-name = "d3";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@3 {
+ reg = <3>;
+ chan-name = "d4";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@4 {
+ reg = <4>;
+ chan-name = "d5";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@5 {
+ reg = <5>;
+ chan-name = "d6";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@6 {
+ reg = <6>;
+ chan-name = "d7";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@7 {
+ reg = <7>;
+ chan-name = "d8";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
+
+ led@8 {
+ reg = <8>;
+ chan-name = "d9";
+ led-cur = /bits/ 8 <0x14>;
+ max-cur = /bits/ 8 <0x20>;
+ };
};
- led-controller@33 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "national,lp5523";
- reg = <0x33>;
- clock-mode = /bits/ 8 <0>;
-
- multi-led@2 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0x2>;
- color = <LED_COLOR_ID_RGB>;
- function = LED_FUNCTION_STANDBY;
- linux,default-trigger = "heartbeat";
-
- led@0 {
- led-cur = /bits/ 8 <50>;
- max-cur = /bits/ 8 <100>;
- reg = <0x0>;
- color = <LED_COLOR_ID_GREEN>;
- };
-
- led@1 {
- led-cur = /bits/ 8 <50>;
- max-cur = /bits/ 8 <100>;
- reg = <0x1>;
- color = <LED_COLOR_ID_BLUE>;
- };
-
- led@6 {
- led-cur = /bits/ 8 <50>;
- max-cur = /bits/ 8 <100>;
- reg = <0x6>;
- color = <LED_COLOR_ID_RED>;
- };
+ led-controller@33 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "national,lp5523";
+ reg = <0x33>;
+ clock-mode = /bits/ 8 <0>;
+
+ multi-led@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STANDBY;
+ linux,default-trigger = "heartbeat";
+
+ led@0 {
+ led-cur = /bits/ 8 <50>;
+ max-cur = /bits/ 8 <100>;
+ reg = <0x0>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@1 {
+ led-cur = /bits/ 8 <50>;
+ max-cur = /bits/ 8 <100>;
+ reg = <0x1>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+
+ led@6 {
+ led-cur = /bits/ 8 <50>;
+ max-cur = /bits/ 8 <100>;
+ reg = <0x6>;
+ color = <LED_COLOR_ID_RED>;
+ };
};
};
};
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
index 6625a528f727..fdaf04e03a8d 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
@@ -55,24 +55,24 @@ examples:
compatible = "pwm-leds-multicolor";
multi-led {
- color = <LED_COLOR_ID_RGB>;
- function = LED_FUNCTION_INDICATOR;
- max-brightness = <65535>;
-
- led-red {
- pwms = <&pwm1 0 1000000>;
- color = <LED_COLOR_ID_RED>;
- };
-
- led-green {
- pwms = <&pwm2 0 1000000>;
- color = <LED_COLOR_ID_GREEN>;
- };
-
- led-blue {
- pwms = <&pwm3 0 1000000>;
- color = <LED_COLOR_ID_BLUE>;
- };
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_INDICATOR;
+ max-brightness = <65535>;
+
+ led-red {
+ pwms = <&pwm1 0 1000000>;
+ color = <LED_COLOR_ID_RED>;
+ };
+
+ led-green {
+ pwms = <&pwm2 0 1000000>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led-blue {
+ pwms = <&pwm3 0 1000000>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example
2022-06-07 7:52 [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
2022-06-07 7:52 ` [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
@ 2022-06-20 16:04 ` Krzysztof Kozlowski
2022-07-19 7:37 ` Krzysztof Kozlowski
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-06-20 16:04 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Dan Murphy,
Jacek Anaszewski, Sven Schwermer, linux-leds, devicetree,
linux-kernel
Cc: Rob Herring, Kyle Swenson
On 07/06/2022 09:52, Krzysztof Kozlowski wrote:
> The multi-led node defined address/size cells, so it is intended to have
> children with unit addresses.
>
> The second multi-led's reg property defined three LED indexes within one
> reg item, which is not correct - these are three separate items.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
>
> ---
Pavel, Jacek,
Any comments on these two patches?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example
2022-06-20 16:04 ` [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
@ 2022-07-19 7:37 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-19 7:37 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Krzysztof Kozlowski
Cc: Rob Herring, linux-leds, Kyle Swenson, Sven Schwermer,
devicetree, Jacek Anaszewski, linux-kernel, Dan Murphy
On 20/06/2022 18:04, Krzysztof Kozlowski wrote:
> On 07/06/2022 09:52, Krzysztof Kozlowski wrote:
>> The multi-led node defined address/size cells, so it is intended to have
>> children with unit addresses.
>>
>> The second multi-led's reg property defined three LED indexes within one
>> reg item, which is not correct - these are three separate items.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Reviewed-by: Rob Herring <robh@kernel.org>
>>
>> ---
>
> Pavel, Jacek,
>
> Any comments on these two patches?
Pavel,
Although previously this was "just" correcting the example, now it is
actually a needed fix because of changes which came later:
https://lore.kernel.org/all/CAL_JsqKHviWcynOu5AYJxtJ5xbQU6cU+r6tHy=ao+Wt4mE1aVQ@mail.gmail.com/
Can you apply it?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples
2022-06-07 7:52 ` [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
@ 2022-07-19 7:37 ` Krzysztof Kozlowski
2022-07-21 17:10 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-19 7:37 UTC (permalink / raw)
To: Pavel Machek, Rob Herring
Cc: Rob Herring, Jacek Anaszewski, devicetree, Sven Schwermer,
Krzysztof Kozlowski, Kyle Swenson, linux-leds, Dan Murphy,
linux-kernel
On 07/06/2022 09:52, Krzysztof Kozlowski wrote:
> The examples were mixing 4-space with 2- and 3-space indentations, so
> correct them to use 4-space one. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
Any comments for this patch as well?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples
2022-06-07 7:52 ` [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
2022-07-19 7:37 ` Krzysztof Kozlowski
@ 2022-07-21 17:10 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2022-07-21 17:10 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jacek Anaszewski, Dan Murphy, Krzysztof Kozlowski, Rob Herring,
Kyle Swenson, Sven Schwermer, linux-kernel, linux-leds,
Pavel Machek, devicetree
On Tue, 07 Jun 2022 09:52:47 +0200, Krzysztof Kozlowski wrote:
> The examples were mixing 4-space with 2- and 3-space indentations, so
> correct them to use 4-space one. No functional change.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
>
> ---
>
> Changes since v2:
> 1. Add Rb tag.
>
> Changes since v1:
> 1. None
>
> Cc: Kyle Swenson <kyle.swenson@est.tech>
> ---
> .../devicetree/bindings/leds/leds-lp50xx.yaml | 110 ++++-----
> .../devicetree/bindings/leds/leds-lp55xx.yaml | 222 +++++++++---------
> .../bindings/leds/leds-pwm-multicolor.yaml | 36 +--
> 3 files changed, 184 insertions(+), 184 deletions(-)
>
Applied both patches, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-21 17:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 7:52 [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
2022-06-07 7:52 ` [PATCH v3 2/2] dt-bindings: leds: fix indentation in examples Krzysztof Kozlowski
2022-07-19 7:37 ` Krzysztof Kozlowski
2022-07-21 17:10 ` Rob Herring
2022-06-20 16:04 ` [PATCH v3 1/2] dt-bindings: leds: lp50xx: correct reg/unit addresses in example Krzysztof Kozlowski
2022-07-19 7:37 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.