leds: pwm: Make automatic labels work
Subsystems (10)
v6 cover leds: pwm: Make automatic labels work
Hei hei,
for leds-gpio you can use the properties 'function' and 'color' in the devicetree node and omit 'label', the label is constructed automatically. This is a common feature supposed to be working for all LED drivers. However it did not yet work for the 'leds-pwm' driver.
This series removes platform_data support for the leds-pwm driver and takes the opportunity to update the leds-pwm dt-bindings accordingly.
After myself being one week on vacation patch 2/3 was already picked by Pavel and I gathered some more feedback on the remaining issues.
v6 was compile tested and dt_bindings_check and dtbs_check were run.
Note: I added some patches to fix DT schema warnings, but I did not put every reviewer/supporter/maintainer printed by get_maintainers in Cc to keep that list reasonable small.
Series changelog below …
Greets
Alex
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 (7):
leds: pwm: Remove platform_data support
dt-bindings: leds: Convert pwm to yaml
dt-bindings: mfd: Fix schema warnings for pwm-leds
ARM: dts: at91: smartkiz: Reference led node directly
ARM: dts: Fix schema warnings for pwm-leds
arm64: dts: meson: Fix schema warnings for pwm-leds
MIPS: DTS: img: Fix schema warnings for pwm-leds
.../devicetree/bindings/leds/leds-pwm.txt | 50 ------------- .../devicetree/bindings/leds/leds-pwm.yaml | 70 +++++++++++++++++++ .../devicetree/bindings/mfd/iqs62x.yaml | 5 +- arch/arm/boot/dts/at91-kizbox.dts | 10 +-- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 +-- arch/arm/boot/dts/at91-kizbox3-hs.dts | 16 ++--- arch/arm/boot/dts/at91-kizbox3_common.dtsi | 10 +-- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 8 +-- arch/arm/boot/dts/at91-smartkiz.dts | 6 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +-- arch/arm/boot/dts/at91sam9rlek.dts | 10 +-- .../boot/dts/berlin2cd-google-chromecast.dts | 6 +- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +- .../boot/dts/exynos54xx-odroidxu-leds.dtsi | 11 +-- arch/arm/boot/dts/imx53-ppd.dts | 15 ++-- arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 4 +- .../boot/dts/imx6sx-softing-vining-2000.dts | 8 +-- arch/arm/boot/dts/omap3-beagle-xm.dts | 10 +-- arch/arm/boot/dts/omap3-overo-base.dtsi | 4 +- arch/arm/boot/dts/omap4-kc1.dts | 6 +- arch/arm/boot/dts/omap4-sdp.dts | 26 +++---- arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 12 ++-- .../amlogic/meson-gxl-s905x-khadas-vim.dts | 4 +- .../dts/amlogic/meson-gxm-khadas-vim2.dts | 4 +- .../boot/dts/amlogic/meson-sm1-sei610.dts | 8 +-- arch/mips/boot/dts/img/pistachio_marduk.dts | 5 +- drivers/leds/leds-pwm.c | 30 ++------ 28 files changed, 184 insertions(+), 180 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
base-commit: 8fd8f94235c2c925d80b2316e0ab2bdd00af9bae
Signature · 1 line
2.20.1
PATCH v6 1/7 leds: pwm: Remove platform_data support
Since commit 141f15c66d94 ("leds: pwm: remove header") that platform interface is not usable from outside and there seems to be no in tree user anymore. All in-tree users of the leds-pwm driver seem to use DT currently. Getting rid of the old platform interface allows the leds-pwm driver to switch over from 'devm_led_classdev_register()' to 'devm_led_classdev_register_ext()'.
---
Notes:
v5 -> v6:
* added Reviewed-by from Marek
* minimal commit message rewording, because a later patch was already applied
v5:
* added this patch to series (replacing another patch with a not working, different approach)
v5:
* added this patch to series (replacing another patch with a not working, different approach)
drivers/leds/leds-pwm.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-)
drivers/leds/leds-pwm.c +5 -25
@@ -24,11 +24,6 @@ struct led_pwm {unsigned int max_brightness; }; -struct led_pwm_platform_data { -int num_leds; -struct led_pwm *leds; -}; -struct led_pwm_data {struct led_classdev cdev;struct pwm_device *pwm;
@@ -60,6 +55,7 @@ static int led_pwm_set(struct led_classdev *led_cdev,return pwm_apply_state (led_dat->pwm, &led_dat->pwmstate); } +__attribute__((nonnull))static int led_pwm_add (struct device *dev,struct led_pwm_priv *priv,struct led_pwm *led,struct fwnode_handle *fwnode) {
@@ -73,10 +69,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, led_data->cdev.max_brightness = led->max_brightness; led_data->cdev.flags =LED_CORE_SUSPENDRESUME ; -if (fwnode) - led_data->pwm =devm_fwnode_pwm_get (dev, fwnode,NULL ); -else - led_data->pwm =devm_pwm_get (dev, led->name); + led_data->pwm =devm_fwnode_pwm_get (dev, fwnode,NULL );if (IS_ERR (led_data->pwm)) return dev_err_probe(dev, PTR_ERR(led_data->pwm), "unable to request PWM for %s\n",
@@ -139,15 +132,11 @@ static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv)static int led_pwm_probe (struct platform_device *pdev) { -struct led_pwm_platform_data *pdata =dev_get_platdata (&pdev->dev);struct led_pwm_priv *priv; -int count, i;int ret =0 ; +int count; -if (pdata) - count = pdata->num_leds; -else - count =device_get_child_node_count (&pdev->dev); + count =device_get_child_node_count (&pdev->dev);if (!count)return -EINVAL ;
@@ -157,16 +146,7 @@ static int led_pwm_probe(struct platform_device *pdev)if (!priv)return -ENOMEM ; -if (pdata) { -for (i =0 ; i < count; i++) { - ret =led_pwm_add (&pdev->dev, priv, &pdata->leds[i], -NULL ); -if (ret) -break ; - } - }else { - ret =led_pwm_create_fwnode (&pdev->dev, priv); - } + ret =led_pwm_create_fwnode (&pdev->dev, priv);if (ret)return ret;
Signature · 7 lines
2.20.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH v6 2/7 dt-bindings: leds: Convert pwm to yaml
In reply to Alexander DahlThe example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rules
License was discussed with the original author.
---
Notes:
v5 -> v6:
* removed pwm nodes from example (Rob)
* renamed led-controller node in example (Rob)
v4 -> v5:
* updated based on feedback by Rob Herring
* removed Acked-by
v3 -> v4:
* added Cc to original author of the binding
v2 -> v3:
* changed license identifier to recommended one
* added Acked-by
v2:
* added this patch to series (Suggested-by: Jacek Anaszewski)
.../devicetree/bindings/leds/leds-pwm.txt | 50 ------------- .../devicetree/bindings/leds/leds-pwm.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
Documentation/devicetree/bindings/leds/leds-pwm.txt deleted +0 -50
@@ -1,50 +0,0 @@ -LED connected to PWM - -Required properties: -- compatible : should be "pwm-leds". - -Each LED is represented as a sub-node of the pwm-leds device. Each -node's name represents the name of the corresponding LED. - -LED sub-node properties: -- pwms : PWM property to point to the PWM device (phandle)/port (id) and to - specify the period time to be used: <&phandle id period_ns>; -- pwm-names : (optional) Name to be used by the PWM subsystem for the PWM device - For the pwms and pwm-names property please refer to: - Documentation/devicetree/bindings/pwm/pwm.txt -- max-brightness : Maximum brightness possible for the LED -- active-low : (optional) For PWMs where the LED is wired to supply - rather than ground. -- label : (optional) - see Documentation/devicetree/bindings/leds/common.txt -- linux,default-trigger : (optional) - see Documentation/devicetree/bindings/leds/common.txt - -Example: - -twl_pwm: pwm { - /* provides two PWMs (id 0, 1 for PWM1 and PWM2) */ - compatible = "ti,twl6030-pwm"; - #pwm-cells = <2>; -}; - -twl_pwmled: pwmled { - /* provides one PWM (id 0 for Charing indicator LED) */ - compatible = "ti,twl6030-pwmled"; - #pwm-cells = <2>; -}; - -pwmleds { - compatible = "pwm-leds"; - kpad { - label = "omap4::keypad"; - pwms = <&twl_pwm 0 7812500>; - max-brightness = <127>; - }; - - charging { - label = "omap4:green:chrg"; - pwms = <&twl_pwmled 0 7812500>; - max-brightness = <255>; - }; -};
Documentation/devicetree/bindings/leds/leds-pwm.yaml new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.20.1
Krzysztof Kozlowski
maintainerRe: [PATCH v6 2/7] dt-bindings: leds: Convert pwm to yaml
Quoted 6 lines · Alexander Dahl
The example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rules
tweak? or align?
Quoted 2 lines
License was discussed with the original author.
Since you relicense their work, you need an ack or signed off from every author. You cannot just say "I discussed" and post it. That way I could pretend (lie) I talked to Linus and try to relicense Linux to BSD...
You need acks/SoB from Peter and Russel.
Best regards,
Krzysztof
Re: [PATCH v6 2/7] dt-bindings: leds: Convert pwm to yaml
Hei hei,
Am Freitag, 2. Oktober 2020, 11:31:09 CEST schrieb Krzysztof Kozlowski:
Quoted 8 lines · Alexander Dahl
Quoted 5 lines
The example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rulestweak? or align?
Depends on if schema actually checks it (child nodes) or if it's just DT policy (parent node). I'll reword in v7.
Quoted 6 lines
Quoted 1 line
License was discussed with the original author.
Since you relicense their work, you need an ack or signed off from every author. You cannot just say "I discussed" and post it. That way I could pretend (lie) I talked to Linus and try to relicense Linux to BSD...
I know. Peter promised to give his Ack publicly on the list back when I worked on v2 or v3, so he is in Cc since then, but apparently he did not yet post it. ;-)
Quoted 1 line
You need acks/SoB from Peter and Russel.
Well, I should add Russel in v7, too, then.
Thanks
Alex
Re: [PATCH v6 2/7] dt-bindings: leds: Convert pwm to yaml
Quoted 23 lines · Alexander Dahl
Hei hei,
Am Freitag, 2. Oktober 2020, 11:31:09 CEST schrieb Krzysztof Kozlowski:
Quoted 8 lines · Alexander Dahl
Quoted 5 lines
The example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rulestweak? or align?
Depends on if schema actually checks it (child nodes) or if it's just DT policy (parent node). I'll reword in v7.
Quoted 6 lines
Quoted 1 line
License was discussed with the original author.
Since you relicense their work, you need an ack or signed off from every author. You cannot just say "I discussed" and post it. That way I could pretend (lie) I talked to Linus and try to relicense Linux to BSD...
Quoted 7 lines
I know. Peter promised to give his Ack publicly on the list back when I worked on v2 or v3, so he is in Cc since then, but apparently he did not yet post it. ;-)
Quoted 1 line
You need acks/SoB from Peter and Russel.
Well, I should add Russel in v7, too, then.
Yes, please.
For the patch itself:
Best regards,
Krzysztof
Rob Herring
maintainerRe: [PATCH v6 2/7] dt-bindings: leds: Convert pwm to yaml
In reply to Alexander DahlQuoted 29 lines · Alexander Dahl
The example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rulesLicense was discussed with the original author.
Suggested-by Jacek Anaszewski <[email protected]>Signed-off-by Alexander Dahl <[email protected]>Cc Peter Ujfalusi <[email protected]>---
Notes:
v5 -> v6:
* removed pwm nodes from example (Rob)
* renamed led-controller node in example (Rob)v4 -> v5:
* updated based on feedback by Rob Herring
* removed Acked-byv3 -> v4:
* added Cc to original author of the bindingv2 -> v3:
* changed license identifier to recommended one
* added Acked-by
Quoted 9 lines
v2:
* added this patch to series (Suggested-by: Jacek Anaszewski).../devicetree/bindings/leds/leds-pwm.txt | 50 ------------- .../devicetree/bindings/leds/leds-pwm.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
My bot found errors running 'make dt_binding_check' on your patch:
/builds/robherring/linux-dt-review/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: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/leds/leds-pwm.yaml
See https://patchwork.ozlabs.org/patch/1374765
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date:
pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
Please check and re-submit.
Re: [PATCH v6 2/7] dt-bindings: leds: Convert pwm to yaml
In reply to Alexander DahlQuoted 29 lines · Alexander Dahl
The example was adapted in the following ways:
- make use of the now supported 'function' and 'color' properties
- remove pwm nodes, those are documented elsewhere
- tweake node names to be matched by new dtschema rulesLicense was discussed with the original author.
Suggested-by Jacek Anaszewski <[email protected]>Signed-off-by Alexander Dahl <[email protected]>Cc Peter Ujfalusi <[email protected]>---
Notes:
v5 -> v6:
* removed pwm nodes from example (Rob)
* renamed led-controller node in example (Rob)v4 -> v5:
* updated based on feedback by Rob Herring
* removed Acked-byv3 -> v4:
* added Cc to original author of the bindingv2 -> v3:
* changed license identifier to recommended one
* added Acked-by
Quoted 9 lines
v2:
* added this patch to series (Suggested-by: Jacek Anaszewski).../devicetree/bindings/leds/leds-pwm.txt | 50 ------------- .../devicetree/bindings/leds/leds-pwm.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
PATCH v6 3/7 dt-bindings: mfd: Fix schema warnings for pwm-leds
In reply to Alexander DahlThe node names for devices using the pwm-leds driver follow a certain naming scheme (now).
---
Notes:
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
@@ -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 · 1 line
2.20.1
Krzysztof Kozlowski
maintainerRe: [PATCH v6 3/7] dt-bindings: mfd: Fix schema warnings for pwm-leds
Quoted 3 lines · Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
What warning? Please post them here and in every DTS patch.
Your schema does not enforce pwmleds node naming (the main node, not children), or at least I could not see it. You change multiple files in your patchset so are you sure that all these are justified by warnings pointed out by schema?
Best regards,
Krzysztof
Re: [PATCH v6 3/7] dt-bindings: mfd: Fix schema warnings for pwm-leds
Hello Krzysztof,
Am Freitag, 2. Oktober 2020, 11:21:10 CEST schrieb Krzysztof Kozlowski:
Quoted 5 lines · Alexander Dahl
Quoted 2 lines
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
What warning? Please post them here and in every DTS patch.
ack
Quoted 4 lines
Your schema does not enforce pwmleds node naming (the main node, not children), or at least I could not see it. You change multiple files in your patchset so are you sure that all these are justified by warnings pointed out by schema?
The rename was suggested by Rob [1], and I think you're right, those names are not (yet) enforced by schema? So at least the commit message is misleading for now. I'll have to see if I rather reword or update the schema again.
Greets
Alex
[1] https://lore.kernel.org/linux-leds/20200922155747.GA2734659@bogus/
Krzysztof Kozlowski
maintainerRe: [PATCH v6 3/7] dt-bindings: mfd: Fix schema warnings for pwm-leds
Quoted 12 lines · Alexander Dahl
Hello Krzysztof,
Am Freitag, 2. Oktober 2020, 11:21:10 CEST schrieb Krzysztof Kozlowski:
Quoted 5 lines · Alexander Dahl
Quoted 2 lines
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
What warning? Please post them here and in every DTS patch.
ack
Quoted 8 lines
Quoted 4 lines
Your schema does not enforce pwmleds node naming (the main node, not children), or at least I could not see it. You change multiple files in your patchset so are you sure that all these are justified by warnings pointed out by schema?
The rename was suggested by Rob [1], and I think you're right, those names are not (yet) enforced by schema? So at least the commit message is misleading for now. I'll have to see if I rather reword or update the schema again.
If schema does not enforce it, then maybe just mention that you align the children names with schema and pwmleds node to device tree specification guidelines (node name should be generic, reflecting function of the device). However in such case changing only pwmleds node name in DTS (without changing children) would not be justified, IMHO.
Best regards,
Krzysztof
PATCH v6 4/7 ARM: dts: at91: smartkiz: Reference led node directly
In reply to Alexander DahlDo it the simple way like for the other kizbox boards. This will allow renaming the led controller node name later without breaking things.
---
Notes:
v6:
* added this patch to series
arch/arm/boot/dts/at91-smartkiz.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm/boot/dts/at91-smartkiz.dts +2 -4
@@ -84,10 +84,8 @@ status = "okay"; }; -&leds { - blue { - status = "okay"; - }; +&led_blue { + status = "okay"; }; &adc0 {
Signature · 1 line
2.20.1
PATCH v6 5/7 ARM: dts: Fix schema warnings for pwm-leds
In reply to Alexander DahlThe node names for devices using the pwm-leds driver follow a certain naming scheme (now).
---
Notes:
v6:
* added this patch to series
arch/arm/boot/dts/at91-kizbox.dts | 10 +++---- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 +++--- arch/arm/boot/dts/at91-kizbox3-hs.dts | 16 ++++++------ arch/arm/boot/dts/at91-kizbox3_common.dtsi | 10 +++---- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 8 +++--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +++---- arch/arm/boot/dts/at91sam9rlek.dts | 10 +++---- .../boot/dts/berlin2cd-google-chromecast.dts | 6 ++--- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +-- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +-- .../boot/dts/exynos54xx-odroidxu-leds.dtsi | 11 ++++---- arch/arm/boot/dts/imx53-ppd.dts | 15 ++++++----- arch/arm/boot/dts/imx6qdl-cubox-i.dtsi | 4 +-- .../boot/dts/imx6sx-softing-vining-2000.dts | 8 +++--- arch/arm/boot/dts/omap3-beagle-xm.dts | 10 +++---- arch/arm/boot/dts/omap3-overo-base.dtsi | 4 +-- arch/arm/boot/dts/omap4-kc1.dts | 6 ++--- arch/arm/boot/dts/omap4-sdp.dts | 26 ++++++++++--------- arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 12 ++++----- 19 files changed, 93 insertions(+), 89 deletions(-)
arch/arm/boot/dts/at91-kizbox.dts +5 -5
@@ -48,31 +48,31 @@ }; }; - pwm_leds { + led-controller { compatible = "pwm-leds"; - network_green { + led-1 { label = "pwm:green:network"; pwms = <&tcb_pwm 2 10000000 PWM_POLARITY_INVERTED>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - network_red { + led-2 { label = "pwm:red:network"; pwms = <&tcb_pwm 4 10000000 PWM_POLARITY_INVERTED>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - user_green { + led-3 { label = "pwm:green:user"; pwms = <&tcb_pwm 0 10000000 PWM_POLARITY_INVERTED>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - user_red { + led-4 { label = "pwm:red:user"; pwms = <&tcb_pwm 1 10000000 PWM_POLARITY_INVERTED>; max-brightness = <255>;
arch/arm/boot/dts/at91-kizbox2-common.dtsi +4 -4
@@ -58,24 +58,24 @@ }; }; - pwm_leds { + led-controller { compatible = "pwm-leds"; - blue { + led-1 { label = "pwm:blue:user"; pwms = <&pwm0 2 10000000 0>; max-brightness = <255>; linux,default-trigger = "none"; }; - green { + led-2 { label = "pwm:green:user"; pwms = <&pwm0 1 10000000 0>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - red { + led-3 { label = "pwm:red:user"; pwms = <&pwm0 0 10000000 0>; max-brightness = <255>;
arch/arm/boot/dts/at91-kizbox3-hs.dts +8 -8
@@ -15,40 +15,40 @@ model = "Overkiz KIZBOX3-HS"; compatible = "overkiz,kizbox3-hs", "atmel,sama5d2", "atmel,sama5"; - pwm_leds { + led-controller-1 { status = "okay"; - red { + led-1 { status = "okay"; }; - green { + led-2 { status = "okay"; }; - blue { + led-3 { status = "okay"; }; - white { + led-4 { status = "okay"; }; }; - leds { + led-controller-2 { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_led_red &pinctrl_led_white>; status = "okay"; - red { + led-5 { label = "pio:red:user"; gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - white { + led-6 { label = "pio:white:user"; gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>; default-state = "off";
arch/arm/boot/dts/at91-kizbox3_common.dtsi +5 -5
@@ -62,7 +62,7 @@ regulator-always-on; }; - pwm_leds { + led-controller-1 { compatible = "pwm-leds"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm0_pwm_h0
@@ -71,7 +71,7 @@ &pinctrl_pwm0_pwm_h3>; status = "disabled"; - red { + led-1 { label = "pwm:red:user"; pwms = <&pwm0 0 10000000 0>; max-brightness = <255>;
@@ -79,7 +79,7 @@ status = "disabled"; }; - green { + led-2 { label = "pwm:green:user"; pwms = <&pwm0 1 10000000 0>; max-brightness = <255>;
@@ -87,14 +87,14 @@ status = "disabled"; }; - blue { + led-3 { label = "pwm:blue:user"; pwms = <&pwm0 2 10000000 0>; max-brightness = <255>; status = "disabled"; }; - white { + led-4 { label = "pwm:white:user"; pwms = <&pwm0 3 10000000 0>; max-brightness = <255>;
arch/arm/boot/dts/at91-kizboxmini-common.dtsi +4 -4
@@ -54,10 +54,10 @@ }; }; - leds: pwm_leds { + leds: led-controller-1 { compatible = "pwm-leds"; - led_blue: pwm_blue { + led_blue: led-1 { label = "pwm:blue:user"; pwms = <&pwm0 2 10000000 0>; max-brightness = <255>;
@@ -65,14 +65,14 @@ status = "disabled"; }; - led_green: pwm_green { + led_green: led-2 { label = "pwm:green:user"; pwms = <&pwm0 0 10000000 0>; max-brightness = <255>; linux,default-trigger = "default-on"; }; - led_red: pwm_red { + led_red: led-3 { label = "pwm:red:user"; pwms = <&pwm0 1 10000000 0>; max-brightness = <255>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +5 -5
@@ -313,27 +313,27 @@ }; }; - leds { + led-controller-1 { compatible = "gpio-leds"; - d8 { + led-1 { label = "d8"; gpios = <&pioD 30 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; }; }; - pwmleds { + led-controller-2 { compatible = "pwm-leds"; - d6 { + led-2 { label = "d6"; pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>; max-brightness = <255>; linux,default-trigger = "nand-disk"; }; - d7 { + led-3 { label = "d7"; pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>; max-brightness = <255>;
arch/arm/boot/dts/at91sam9rlek.dts +5 -5
@@ -218,26 +218,26 @@ }; }; - pwmleds { + led-controller-1 { compatible = "pwm-leds"; - ds1 { + led-1 { label = "ds1"; pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>; max-brightness = <255>; }; - ds2 { + led-2 { label = "ds2"; pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>; max-brightness = <255>; }; }; - leds { + led-controller-2 { compatible = "gpio-leds"; - ds3 { + led-3 { label = "ds3"; gpios = <&pioD 14 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat";
arch/arm/boot/dts/berlin2cd-google-chromecast.dts +3 -3
@@ -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>;
arch/arm/boot/dts/exynos5422-odroidhc1.dts +2 -2
@@ -15,10 +15,10 @@ compatible = "hardkernel,odroid-hc1", "samsung,exynos5800", \ "samsung,exynos5"; - pwmleds { + led-controller { compatible = "pwm-leds"; - blueled { + led-1 { label = "blue:heartbeat"; pwms = <&pwm 2 2000000 0>; pwm-names = "pwm2";
arch/arm/boot/dts/exynos5422-odroidxu4.dts +2 -2
@@ -17,10 +17,10 @@ compatible = "hardkernel,odroid-xu4", "samsung,exynos5800", \ "samsung,exynos5"; - pwmleds { + led-controller { compatible = "pwm-leds"; - blueled { + led-1 { label = "blue:heartbeat"; pwms = <&pwm 2 2000000 0>; pwm-names = "pwm2";
arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi +6 -5
@@ -11,10 +11,10 @@ #include <dt-bindings/gpio/gpio.h> / { - pwmleds { + led-controller-1 { compatible = "pwm-leds"; - greenled { + led-1 { label = "green:mmc0"; pwms = <&pwm 1 2000000 0>; pwm-names = "pwm1";
@@ -26,7 +26,7 @@ linux,default-trigger = "mmc0"; }; - blueled { + led-2 { label = "blue:heartbeat"; pwms = <&pwm 2 2000000 0>; pwm-names = "pwm2";
@@ -35,9 +35,10 @@ }; }; - gpioleds { + led-controller-2 { compatible = "gpio-leds"; - redled { + + led-3 { label = "red:microSD"; gpios = <&gpx2 3 GPIO_ACTIVE_HIGH>; default-state = "off";
arch/arm/boot/dts/imx53-ppd.dts +8 -7
@@ -176,36 +176,37 @@ power-supply = <®_3v3_lcd>; }; - leds-brightness { + led-controller-1 { compatible = "pwm-leds"; - alarm-brightness { + led-1 { + label = "alarm-brightness"; pwms = <&pwm1 0 100000>; max-brightness = <255>; }; }; - leds { + led-controller-2 { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_alarmled_pins>; - alarm1 { + led-2 { label = "alarm:red"; gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>; }; - alarm2 { + led-3 { label = "alarm:yellow"; gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>; }; - alarm3 { + led-4 { label = "alarm:blue"; gpios = <&gpio7 8 GPIO_ACTIVE_HIGH>; }; - alarm4 { + led-5 { label = "alarm:silenced"; gpios = <&gpio7 13 GPIO_ACTIVE_HIGH>; };
arch/arm/boot/dts/imx6qdl-cubox-i.dtsi +2 -2
@@ -55,12 +55,12 @@ pinctrl-0 = <&pinctrl_cubox_i_ir>; }; - pwmleds { + led-controller { compatible = "pwm-leds"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_cubox_i_pwm1>; - front { + led-1 { active-low; label = "imx6:red:front"; max-brightness = <248>;
arch/arm/boot/dts/imx6sx-softing-vining-2000.dts +4 -4
@@ -40,22 +40,22 @@ regulator-max-microvolt = <3300000>; }; - pwmleds { + led-controller { compatible = "pwm-leds"; - red { + led-1 { label = "red"; max-brightness = <255>; pwms = <&pwm6 0 50000>; }; - green { + led-2 { label = "green"; max-brightness = <255>; pwms = <&pwm2 0 50000>; }; - blue { + led-3 { label = "blue"; max-brightness = <255>; pwms = <&pwm1 0 50000>;
arch/arm/boot/dts/omap3-beagle-xm.dts +5 -5
@@ -34,26 +34,26 @@ clock-frequency = <26000000>; }; - leds { + led-controller-1 { compatible = "gpio-leds"; - heartbeat { + led-1 { label = "beagleboard::usr0"; gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* 150 -> D6 LED */ linux,default-trigger = "heartbeat"; }; - mmc { + led-2 { label = "beagleboard::usr1"; gpios = <&gpio5 21 GPIO_ACTIVE_HIGH>; /* 149 -> D7 LED */ linux,default-trigger = "mmc0"; }; }; - pwmleds { + led-controller-2 { compatible = "pwm-leds"; - pmu_stat { + led-3 { label = "beagleboard::pmu_stat"; pwms = <&twl_pwmled 1 7812500>; max-brightness = <127>;
arch/arm/boot/dts/omap3-overo-base.dtsi +2 -2
@@ -14,10 +14,10 @@ reg = <0 0>; }; - pwmleds { + led-controller { compatible = "pwm-leds"; - overo { + led-1 { label = "overo:blue:COM"; pwms = <&twl_pwmled 1 7812500>; max-brightness = <127>;
arch/arm/boot/dts/omap4-kc1.dts +3 -3
@@ -15,16 +15,16 @@ reg = <0x80000000 0x20000000>; /* 512 MB */ }; - pwmleds { + led-controller { compatible = "pwm-leds"; - green { + led-1 { label = "green"; pwms = <&twl_pwm 0 7812500>; max-brightness = <127>; }; - orange { + led-2 { label = "orange"; pwms = <&twl_pwm 1 7812500>; max-brightness = <127>;
arch/arm/boot/dts/omap4-sdp.dts +14 -12
@@ -45,58 +45,60 @@ regulator-boot-on; }; - leds { + led-controller-1 { compatible = "gpio-leds"; - debug0 { + + led-1 { label = "omap4:green:debug0"; gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; /* 61 */ }; - debug1 { + led-2 { label = "omap4:green:debug1"; gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; /* 30 */ }; - debug2 { + led-3 { label = "omap4:green:debug2"; gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; /* 7 */ }; - debug3 { + led-4 { label = "omap4:green:debug3"; gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; /* 8 */ }; - debug4 { + led-5 { label = "omap4:green:debug4"; gpios = <&gpio2 18 GPIO_ACTIVE_HIGH>; /* 50 */ }; - user1 { + led-6 { label = "omap4:blue:user"; gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* 169 */ }; - user2 { + led-7 { label = "omap4:red:user"; gpios = <&gpio6 10 GPIO_ACTIVE_HIGH>; /* 170 */ }; - user3 { + led-8 { label = "omap4:green:user"; gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>; /* 139 */ }; }; - pwmleds { + led-controller-2 { compatible = "pwm-leds"; - kpad { + + led-9 { label = "omap4::keypad"; pwms = <&twl_pwm 0 7812500>; max-brightness = <127>; }; - charging { + led-10 { label = "omap4:green:chrg"; pwms = <&twl_pwmled 0 7812500>; max-brightness = <255>;
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts +6 -6
@@ -36,34 +36,34 @@ stdout-path = &uart4; }; - led-act { + led-controller-1 { compatible = "gpio-leds"; - led-green { + led-1 { label = "mc1:green:act"; gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; }; }; - led-rgb { + led-controller-2 { compatible = "pwm-leds"; - led-red { + led-2 { label = "mc1:red:rgb"; pwms = <&leds_pwm 1 1000000 0>; max-brightness = <255>; active-low; }; - led-green { + led-3 { label = "mc1:green:rgb"; pwms = <&leds_pwm 2 1000000 0>; max-brightness = <255>; active-low; }; - led-blue { + led-4 { label = "mc1:blue:rgb"; pwms = <&leds_pwm 3 1000000 0>; max-brightness = <255>;
Signature · 1 line
2.20.1
Krzysztof Kozlowski
maintainerRe: [PATCH v6 5/7] ARM: dts: Fix schema warnings for pwm-leds
Quoted 11 lines · Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
Signed-off-by Alexander Dahl <[email protected]>---
Notes:
v6:
* added this patch to series
Quoted 10 lines
arch/arm/boot/dts/at91-kizbox.dts | 10 +++---- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 +++--- arch/arm/boot/dts/at91-kizbox3-hs.dts | 16 ++++++------ arch/arm/boot/dts/at91-kizbox3_common.dtsi | 10 +++---- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 8 +++--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +++---- arch/arm/boot/dts/at91sam9rlek.dts | 10 +++---- .../boot/dts/berlin2cd-google-chromecast.dts | 6 ++--- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +-- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +--
Somehow you did not CC the maintainers... please use scripts/get_maintainers.pl to obtain list of addresses.
All these should be separate patches per sub-architecture.
Best regards,
Krzysztof
Re: [PATCH v6 5/7] ARM: dts: Fix schema warnings for pwm-leds
Hello Krzysztof,
Am Freitag, 2. Oktober 2020, 11:12:50 CEST schrieb Krzysztof Kozlowski:
Quoted 22 lines · Alexander Dahl
Quoted 10 lines
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
Signed-off-by Alexander Dahl <[email protected]>---
Notes:
v6:
* added this patch to seriesQuoted 10 lines
arch/arm/boot/dts/at91-kizbox.dts | 10 +++---- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 +++--- arch/arm/boot/dts/at91-kizbox3-hs.dts | 16 ++++++------ arch/arm/boot/dts/at91-kizbox3_common.dtsi | 10 +++---- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 8 +++--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +++---- arch/arm/boot/dts/at91sam9rlek.dts | 10 +++---- .../boot/dts/berlin2cd-google-chromecast.dts | 6 ++--- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +-- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +--
Quoted 2 lines
Somehow you did not CC the maintainers... please use
scripts/get_maintainers.plto obtain list of addresses.
Well, that will be a huge list of Cc then. What is the policy? Everybody gets the whole series or different list of receivers per patch?
Quoted 1 line
All these should be separate patches per sub-architecture.
I already suspected that. Will do in v7.
Thanks for your feedback.
Alex
Krzysztof Kozlowski
maintainerRe: [PATCH v6 5/7] ARM: dts: Fix schema warnings for pwm-leds
Quoted 26 lines · Alexander Dahl
Hello Krzysztof,
Am Freitag, 2. Oktober 2020, 11:12:50 CEST schrieb Krzysztof Kozlowski:
Quoted 22 lines · Alexander Dahl
Quoted 20 lines
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
Signed-off-by Alexander Dahl <[email protected]>---
Notes:
v6:
* added this patch to seriesarch/arm/boot/dts/at91-kizbox.dts | 10 +++---- arch/arm/boot/dts/at91-kizbox2-common.dtsi | 8 +++--- arch/arm/boot/dts/at91-kizbox3-hs.dts | 16 ++++++------ arch/arm/boot/dts/at91-kizbox3_common.dtsi | 10 +++---- arch/arm/boot/dts/at91-kizboxmini-common.dtsi | 8 +++--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +++---- arch/arm/boot/dts/at91sam9rlek.dts | 10 +++---- .../boot/dts/berlin2cd-google-chromecast.dts | 6 ++--- arch/arm/boot/dts/exynos5422-odroidhc1.dts | 4 +-- arch/arm/boot/dts/exynos5422-odroidxu4.dts | 4 +--
Quoted 5 lines
Quoted 2 lines
Somehow you did not CC the maintainers... please use
scripts/get_maintainers.plto obtain list of addresses.Well, that will be a huge list of Cc then. What is the policy? Everybody gets the whole series or different list of receivers per patch?
With git send email and get_maintainers.pl you can simplify it:
1. Send cover letter to everyone (could be skipped and instead send to mailing lists and then link included under --- in each patch).
2. Send automatically each patch only to maintainers, with adjusted in-reply-to to the cover letter already sent. Something like: git send-email --cc-cmd "scripts/get_maintainer.pl --no-git --no-roles --no-rolestats".
Probably 1+2 could be even one command if you put manually lists as Cc in the cover letter.
Best regards,
Krzysztof
PATCH v6 6/7 arm64: dts: meson: Fix schema warnings for pwm-leds
In reply to Alexander DahlThe node names for devices using the pwm-leds driver follow a certain naming scheme (now).
---
Notes:
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
@@ -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
@@ -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
@@ -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
Re: [PATCH v6 6/7] arm64: dts: meson: Fix schema warnings for pwm-leds
Quoted 69 lines · Alexander Dahl
The node names for devices using the pwm-leds driver follow a certain naming scheme (now).
Signed-off-by Alexander Dahl <[email protected]>---
Notes:
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@@ -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@@ -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 +2
-2@@ -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"; }; };
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts line 120
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +2
-2- pwmleds { + led-controller-2 { compatible = "pwm-leds"; - power { + led-2 { label = "sei610:red:power"; pwms = <&pwm_AO_ab 0 30518 0>; max-brightness = <255>;
PATCH v6 7/7 MIPS: DTS: img: Fix schema warnings for pwm-leds
In reply to Alexander DahlThe node names for devices using the pwm-leds driver follow a certain naming scheme (now).
---
Notes:
v6:
* added this patch to series
arch/mips/boot/dts/img/pistachio_marduk.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/boot/dts/img/pistachio_marduk.dts +3 -2
@@ -46,9 +46,10 @@ regulator-max-microvolt = <1800000>; }; - leds { + led-controller { compatible = "pwm-leds"; - heartbeat { + + led-1 { label = "marduk:red:heartbeat"; pwms = <&pwm 3 300000>; max-brightness = <255>;
Signature · 1 line
2.20.1