Skip to contentSkip to conversation

leds: pwm: Make automatic labels work

PATCH Applied Alexander Dahl 7 participants 16 messages Dec 28, 2020 – Jan 18, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v9 cover leds: pwm: Make automatic labels work

Hei hei,

these are the not yet taken patches from a series which originally fixed a minor issue in the leds pwm driver, then migrated the leds pwm dts docs to yaml (by request), and then fixed all the dts files triggering warnings on those new bindings. The remaining four patches now only fix dts warnings, the base fix and the yaml conversion is already merged to master.

Series changelog below …

Greets
Alex

v9:
- rebased series on v5.11-rc1
- removed already applied patches
- added some more Acked-by

v8:
- rebased series on recent pavel/for-next (post v5.10-rc1)
- removed already applied patches
- added Acked-by on patch 1/5
- updated patch 3/5 based on comments by Ahmad Fatoum

v7:
- rebased series on recent pavel/for-next
- split up arm dts patch by arm sub arch (suggested by Krzysztof Kozlowski)
- added multiple Reviewed-by tags
- slightly reworded commit messages (suggested by Krzysztof Kozlowski)
- added actual dtbs_check warnings to commit messages
- added Russell King to Cc for binding conversion patch (because license)

v6:
- rebased series on recent pavel/for-next
- added Reviewed-by from Marek to patch 1
- patch 2 from v5 was picked by Pavel and is already in his for-next branch
- previous patch 3/3 (now 2/7) was reworked based on feedback by Rob
- added more dt patches fixing warnings after binding conversion to yaml

v5:
- replaced patch 1/3 by a new patch removing platform_data support for the leds-pwm driver
- little rewording of commit message in patch 2/3
- updated patch 3/3 based on feedback by Rob Herring
- added Marek Behún to Cc, because he also works on removing platform_data support
- rebased series on pavel/for-next

v4:
- added led-class patch handling fwnode passing differently (patch 1/3)
- adapted leds-pwm patch to new led-class (patch 2/3)
- contacted original author of leds-pwm dt binding on license issue (patch 3/3)

v3:
- series rebased on v5.9-rc4
- changed license of .yaml file to recommended one (patch 2/2)
- added Acked-by to both patches

v2:
- series rebased on v5.9-rc3
- added the dt-bindings update patch (2/2)

v1:
- based on v5.9-rc2
- backport on v5.4.59 tested and working

Alexander Dahl (4):
dt-bindings: mfd: Fix schema warnings for pwm-leds
ARM: dts: berlin: Fix schema warnings for pwm-leds
ARM: dts: stm32: Fix schema warnings for pwm-leds
arm64: dts: meson: Fix schema warnings for pwm-leds

 Documentation/devicetree/bindings/mfd/iqs62x.yaml   |  5 +++--
 arch/arm/boot/dts/berlin2cd-google-chromecast.dts   |  6 +++---
 arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts           | 13 +++++++------
 .../boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts |  4 ++--
 .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts      |  4 ++--
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts    |  8 ++++----
 6 files changed, 21 insertions(+), 19 deletions(-)

base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e

Signature · 7 lines
2.20.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#1 lore raw

PATCH v9 1/4 dt-bindings: mfd: Fix schema warnings for pwm-leds

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added forgotten Acked-by (Jeff LaBundy)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* added Acked-by (Rob Herring)

v6 -> v7:
* added warning message to commit message (Krzysztof Kozlowski)

v6:
* added this patch to series

 Documentation/devicetree/bindings/mfd/iqs62x.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/iqs62x.yaml +3 -2
index 541b06d80e73..92dc48a8dfa7 100644
@@ -90,10 +90,11 @@ examples:
             };
     };
 
-    pwmleds {
+    led-controller {
             compatible = "pwm-leds";
 
-            panel {
+            led-1 {
+                    label = "panel";
                     pwms = <&iqs620a_pwm 0 1000000>;
                     max-brightness = <255>;
             };
Signature · 7 lines
2.20.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Applied
#2 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Hi!

Quoted 4 lines

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

Quoted 8 lines

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Thanks, applied.
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#3 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Quoted 11 lines · Pavel Machek

Hi!

Quoted 9 lines

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Quoted 5 lines
Quoted 3 lines

Thanks, applied.

Sorry, what?

Applied to what tree?

Signature · 9 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Acked-by
#4 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Hi!

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Quoted 5 lines
Quoted 1 line

Thanks, applied.

Sorry, what?

Applied to what tree?

I took it to (local copy) of leds-next tree on. But now I realised it is mfd, not a LED patch, so I undone that. Sorry for the confusion.

Anyway, patch still looks good to me:

Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#5 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Quoted 19 lines · Pavel Machek

Hi!

Quoted 17 lines
Quoted 9 lines
Quoted 9 lines

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Quoted 5 lines
Quoted 3 lines

Thanks, applied.

Sorry, what?

Quoted 8 lines
Quoted 1 line

Applied to what tree?

I took it to (local copy) of leds-next tree on. But now I realised it is mfd, not a LED patch, so I undone that. Sorry for the confusion.

Anyway, patch still looks good to me:

Thanks Pavel.

I plan on taking this next week.

Signature · 9 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#6 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

In reply to Alexander Dahl
Quoted 23 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added forgotten Acked-by (Jeff LaBundy)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* added Acked-by (Rob Herring)

Quoted 8 lines

v6 -> v7:
* added warning message to commit message (Krzysztof Kozlowski)

v6:
* added this patch to series

 Documentation/devicetree/bindings/mfd/iqs62x.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Failed to apply:

Applying: dt-bindings: mfd: Fix schema warnings for pwm-leds
Using index info to reconstruct a base tree...
M Documentation/devicetree/bindings/mfd/iqs62x.yaml
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:34: indent with spaces.

            led-1 {
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:35: indent with spaces.
                    label = "panel";

warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Documentation/devicetree/bindings/mfd/iqs62x.yaml
CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/mfd/iqs62x.yaml Recorded preimage for 'Documentation/devicetree/bindings/mfd/iqs62x.yaml'

Signature · 9 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#7 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Hi Alexander,

Quoted 40 lines · Lee Jones
Quoted 23 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added forgotten Acked-by (Jeff LaBundy)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* added Acked-by (Rob Herring)

Quoted 8 lines

v6 -> v7:
* added warning message to commit message (Krzysztof Kozlowski)

v6:
* added this patch to series

 Documentation/devicetree/bindings/mfd/iqs62x.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Failed to apply:

Applying: dt-bindings: mfd: Fix schema warnings for pwm-leds
Using index info to reconstruct a base tree...
M Documentation/devicetree/bindings/mfd/iqs62x.yaml
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:34: indent with spaces.

Quoted 8 lines
            led-1 {
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:35: indent with spaces.
                    label = "panel";

warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Documentation/devicetree/bindings/mfd/iqs62x.yaml
CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/mfd/iqs62x.yaml Recorded preimage for 'Documentation/devicetree/bindings/mfd/iqs62x.yaml'

It looks like the following patch already beat this to the punch:

8237e8382498 ("dt-bindings: mfd: Correct the node name of the panel LED")

That patch does not retain the LED's label or rename the parent node to led-controller, however. The label hardly matters for this example, but perhaps we still want the parent node change to follow leds-pwm.yaml.

Quoted 6 lines
Signature · 5 lines
-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Kind regards,
Jeff LaBundy

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#8 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Hello Jeff,

Quoted 50 lines · Jeff LaBundy
Quoted 40 lines · Lee Jones
Quoted 23 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added forgotten Acked-by (Jeff LaBundy)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* added Acked-by (Rob Herring)

Quoted 8 lines

v6 -> v7:
* added warning message to commit message (Krzysztof Kozlowski)

v6:
* added this patch to series

 Documentation/devicetree/bindings/mfd/iqs62x.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Failed to apply:

Applying: dt-bindings: mfd: Fix schema warnings for pwm-leds
Using index info to reconstruct a base tree...
M Documentation/devicetree/bindings/mfd/iqs62x.yaml
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:34: indent with spaces.

Quoted 8 lines
            led-1 {
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:35: indent with spaces.
                    label = "panel";

warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Documentation/devicetree/bindings/mfd/iqs62x.yaml
CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/mfd/iqs62x.yaml Recorded preimage for 'Documentation/devicetree/bindings/mfd/iqs62x.yaml'

Quoted 3 lines

It looks like the following patch already beat this to the punch:

8237e8382498 ("dt-bindings: mfd: Correct the node name of the panel LED")

Which tree is that commit on? This one?

https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/

Quoted 3 lines

That patch does not retain the LED's label or rename the parent node to led-controller, however. The label hardly matters for this example, but perhaps we still want the parent node change to follow leds-pwm.yaml.

Should I rework the patch then to have that change only?

Greets
Alex

Signature · 4 lines
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#9 lore raw

Re: [PATCH v9 1/4] dt-bindings: mfd: Fix schema warnings for pwm-leds

Hi Alexander,

Thanks again for your work on this.

Quoted 53 lines · Alexander Dahl

Hello Jeff,

Quoted 50 lines · Jeff LaBundy
Quoted 48 lines · Lee Jones
Quoted 23 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
CHECK Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml
/home/alex/build/linux/Documentation/devicetree/bindings/mfd/iqs62x.example.dt.yaml: pwmleds: 'panel' does not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added forgotten Acked-by (Jeff LaBundy)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* added Acked-by (Rob Herring)

Quoted 8 lines

v6 -> v7:
* added warning message to commit message (Krzysztof Kozlowski)

v6:
* added this patch to series

 Documentation/devicetree/bindings/mfd/iqs62x.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Failed to apply:

Applying: dt-bindings: mfd: Fix schema warnings for pwm-leds
Using index info to reconstruct a base tree...
M Documentation/devicetree/bindings/mfd/iqs62x.yaml
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:34: indent with spaces.

            led-1 {
/home/lee/projects/linux/kernel/.git/worktrees/mfd/rebase-apply/patch:35: indent with spaces.
                    label = "panel";

warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging Documentation/devicetree/bindings/mfd/iqs62x.yaml
CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/mfd/iqs62x.yaml Recorded preimage for 'Documentation/devicetree/bindings/mfd/iqs62x.yaml'

Quoted 7 lines
Quoted 3 lines

It looks like the following patch already beat this to the punch:

8237e8382498 ("dt-bindings: mfd: Correct the node name of the panel LED")

Which tree is that commit on? This one?

https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/

That's correct.

Quoted 6 lines
Quoted 4 lines

That patch does not retain the LED's label or rename the parent node to led-controller, however. The label hardly matters for this example, but perhaps we still want the parent node change to follow leds-pwm.yaml.

Should I rework the patch then to have that change only?

That seems like a reasonable compromise.

Quoted 9 lines

Greets
Alex

Signature · 4 lines
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

Kind regards,
Jeff LaBundy

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#10 lore raw

PATCH v9 2/4 ARM: dts: berlin: Fix schema warnings for pwm-leds

In reply to Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml
CHECK arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml
/home/alex/build/linux/arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml: leds: 'red', 'white' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)

v6 -> v7:
* split up patch (one per sub arch)
* added actual warnings to commit message

 arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/berlin2cd-google-chromecast.dts +3 -3
index 56fa951bc86f..c1d91424e658 100644
@@ -34,19 +34,19 @@
 		linux,usable-memory = <0x00000000 0x20000000>; /* 512 MB */
 	};
 
-	leds {
+	led-controller {
 		compatible = "pwm-leds";
 		pinctrl-0 = <&ledpwm_pmux>;
 		pinctrl-names = "default";
 
-		white {
+		led-1 {
 			label = "white";
 			pwms = <&pwm 0 600000 0>;
 			max-brightness = <255>;
 			linux,default-trigger = "default-on";
 		};
 
-		red {
+		led-2 {
 			label = "red";
 			pwms = <&pwm 1 600000 0>;
 			max-brightness = <255>;
Signature · 7 lines
2.20.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#11 lore raw

Re: [PATCH v9 2/4] ARM: dts: berlin: Fix schema warnings for pwm-leds

Quoted 11 lines · On Mon, 28 Dec 2020 17:32:15 +0100 Alexander Dahl <[email protected]> wrote:

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml
CHECK arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml
/home/alex/build/linux/arch/arm/boot/dts/berlin2cd-google-chromecast.dt.yaml: leds: 'red', 'white' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Thanks for the patch.
I took this patch but sent out the PR late: https://www.spinics.net/lists/arm-kernel/msg862567.html
I will send out PR earlier for 5.12

Quoted 44 lines

---

Notes:
v8 -> v9:
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)

v6 -> v7:
* split up patch (one per sub arch)
* added actual warnings to commit message

 arch/arm/boot/dts/berlin2cd-google-chromecast.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/berlin2cd-google-chromecast.dts +3 -4
index 56fa951bc86f..c1d91424e658 100644
@@ -34,19 +34,19 @@
                linux,usable-memory = <0x00000000 0x20000000>; /* 512 MB */
        };
 
-       leds {
+       led-controller {
                compatible = "pwm-leds";
                pinctrl-0 = <&ledpwm_pmux>;
                pinctrl-names = "default";
 
-               white {
+               led-1 {
                        label = "white";
                        pwms = <&pwm 0 600000 0>;
                        max-brightness = <255>;
                        linux,default-trigger = "default-on";
                };
 
-               red {
+               led-2 {
                        label = "red";
                        pwms = <&pwm 1 600000 0>;
                        max-brightness = <255>;
--
Quoted 2 lines

2.20.1

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#12 lore raw

PATCH v9 3/4 ARM: dts: stm32: Fix schema warnings for pwm-leds

In reply to Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

DTC arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml
CHECK arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml
/home/alex/build/linux/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml: led-rgb: 'led-blue', 'led-green', 'led-red' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

---

Notes:
v8 -> v9:
* added Acked-by (Ahmad Fatoum)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* updated indexes and added comment (Ahmad Fatoum)

v6 -> v7:
* split up patch (one per sub arch)
* added actual warnings to commit message

 arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts +7 -6
index cda8e871f999..1e9bf7eea0f1 100644
@@ -36,34 +36,35 @@
 		stdout-path = &uart4;
 	};
 
-	led-act {
+	led-controller-0 {
 		compatible = "gpio-leds";
 
-		led-green {
+		led-0 {
 			label = "mc1:green:act";
 			gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "heartbeat";
 		};
 	};
 
-	led-rgb {
+	led-controller-1 {
 		compatible = "pwm-leds";
 
-		led-red {
+		/* led-1 to led-3 are part of a single RGB led */
+		led-1 {
 			label = "mc1:red:rgb";
 			pwms = <&leds_pwm 1 1000000 0>;
 			max-brightness = <255>;
 			active-low;
 		};
 
-		led-green {
+		led-2 {
 			label = "mc1:green:rgb";
 			pwms = <&leds_pwm 2 1000000 0>;
 			max-brightness = <255>;
 			active-low;
 		};
 
-		led-blue {
+		led-3 {
 			label = "mc1:blue:rgb";
 			pwms = <&leds_pwm 3 1000000 0>;
 			max-brightness = <255>;
Signature · 7 lines
2.20.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#13 lore raw

Re: [PATCH v9 3/4] ARM: dts: stm32: Fix schema warnings for pwm-leds

Hi Alexander

Quoted 11 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

   DTC     arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml
   CHECK   arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml

/home/alex/build/linux/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dt.yaml: led-rgb: 'led-blue', 'led-green', 'led-red' do not match any of the regexes: '^led(-[0-9a-f]+)?$', 'pinctrl-[0-9]+'
From schema: /home/alex/src/linux/leds/Documentation/devicetree/bindings/leds/leds-pwm.yaml

Applied on stm32-next.

Thanks.
Alex

Quoted 55 lines

---

Notes:
v8 -> v9:
* added Acked-by (Ahmad Fatoum)
* rebased on v5.11-rc1

v7 -> v8:
* rebased on recent pavel/for-next (post v5.10-rc1)
* updated indexes and added comment (Ahmad Fatoum)

v6 -> v7:
* split up patch (one per sub arch)
* added actual warnings to commit message

  arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts +6 -5
index cda8e871f999..1e9bf7eea0f1 100644
@@ -36,34 +36,35 @@
  		stdout-path = &uart4;
  	};
 
-	led-act {
+	led-controller-0 {
  		compatible = "gpio-leds";
 
-		led-green {
+		led-0 {
  			label = "mc1:green:act";
  			gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
  			linux,default-trigger = "heartbeat";
  		};
  	};
 
-	led-rgb {
+	led-controller-1 {
  		compatible = "pwm-leds";
 
-		led-red {
+		/* led-1 to led-3 are part of a single RGB led */
+		led-1 {
  			label = "mc1:red:rgb";
  			pwms = <&leds_pwm 1 1000000 0>;
  			max-brightness = <255>;
  			active-low;
  		};
 
-		led-green {
+		led-2 {
  			label = "mc1:green:rgb";

arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts line 70

Quoted 10 lines
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts +1 -1
  			pwms = <&leds_pwm 2 1000000 0>;
  			max-brightness = <255>;
  			active-low;
  		};
 
-		led-blue {
+		led-3 {
  			label = "mc1:blue:rgb";
  			pwms = <&leds_pwm 3 1000000 0>;
  			max-brightness = <255>;

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#14 lore raw

PATCH v9 4/4 arm64: dts: meson: Fix schema warnings for pwm-leds

In reply to Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

---

Notes:
v8 -> v9:
* rebased on v5.11-rc1

v7 -> v8:
* rebased on pavel/for-next (post v5.10-rc1)

v6 -> v7:
* added Reviewed-by
* added another explaining sentence to commit message

v6:
* added this patch to series

 .../arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts     | 4 ++--
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts          | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +2 -2
index 6fe589cd2ba2..45adae480a3d 100644
@@ -42,10 +42,10 @@
 		};
 	};
 
-	pwmleds {
+	led-controller {
 		compatible = "pwm-leds";
 
-		power {
+		led-1 {
 			label = "vim:red:power";
 			pwms = <&pwm_AO_ab 1 7812500 0>;
 			max-brightness = <255>;
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +2 -2
index bf9877d33427..25857e0c0831 100644
@@ -81,10 +81,10 @@
 		};
 	};
 
-	pwmleds {
+	led-controller {
 		compatible = "pwm-leds";
 
-		power {
+		led-1 {
 			label = "vim:red:power";
 			pwms = <&pwm_AO_ab 1 7812500 0>;
 			max-brightness = <255>;
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +4 -4
index 5ab139a34c01..039a8d0d1e9b 100644
@@ -101,20 +101,20 @@
 		};
 	};
 
-	leds {
+	led-controller-1 {
 		compatible = "gpio-leds";
 
-		led-bluetooth {
+		led-1 {
 			label = "sei610:blue:bt";
 			gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
 			default-state = "off";
 		};
 	};
 
-	pwmleds {
+	led-controller-2 {
 		compatible = "pwm-leds";
 
-		power {
+		led-2 {
 			label = "sei610:red:power";
 			pwms = <&pwm_AO_ab 0 30518 0>;
 			max-brightness = <255>;
Signature · 7 lines
2.20.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#15 lore raw

Re: [PATCH v9 4/4] arm64: dts: meson: Fix schema warnings for pwm-leds

Quoted 6 lines · Alexander Dahl

The node names for devices using the pwm-leds driver follow a certain naming scheme (now). Parent node name is not enforced, but recommended by DT project.

Queued for 5.12,

Thanks,

Kevin

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic