diff mbox series

[v6,3/7] dt-bindings: mfd: Fix schema warnings for pwm-leds

Message ID 20200930234637.7573-4-post@lespocky.de (mailing list archive)
State Superseded
Headers show
Series leds: pwm: Make automatic labels work | expand

Commit Message

Alexander Dahl Sept. 30, 2020, 11:46 p.m. UTC
The node names for devices using the pwm-leds driver follow a certain
naming scheme (now).

Signed-off-by: Alexander Dahl <post@lespocky.de>
---

Notes:
    v6:
      * added this patch to series

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

Comments

Krzysztof Kozlowski Oct. 2, 2020, 9:21 a.m. UTC | #1
On Thu, 1 Oct 2020 at 01:51, Alexander Dahl <post@lespocky.de> wrote:
>
> 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
Alexander Dahl Oct. 2, 2020, 10:07 a.m. UTC | #2
Hello Krzysztof,

Am Freitag, 2. Oktober 2020, 11:21:10 CEST schrieb Krzysztof Kozlowski:
> On Thu, 1 Oct 2020 at 01:51, Alexander Dahl <post@lespocky.de> wrote:
> > 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

> 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 Oct. 2, 2020, 10:12 a.m. UTC | #3
On Fri, 2 Oct 2020 at 12:07, Alexander Dahl <ada@thorsis.com> wrote:
>
> Hello Krzysztof,
>
> Am Freitag, 2. Oktober 2020, 11:21:10 CEST schrieb Krzysztof Kozlowski:
> > On Thu, 1 Oct 2020 at 01:51, Alexander Dahl <post@lespocky.de> wrote:
> > > 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
>
> > 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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/iqs62x.yaml b/Documentation/devicetree/bindings/mfd/iqs62x.yaml
index 541b06d80e73..92dc48a8dfa7 100644
--- a/Documentation/devicetree/bindings/mfd/iqs62x.yaml
+++ b/Documentation/devicetree/bindings/mfd/iqs62x.yaml
@@ -90,10 +90,11 @@  examples:
             };
     };
 
-    pwmleds {
+    led-controller {
             compatible = "pwm-leds";
 
-            panel {
+            led-1 {
+                    label = "panel";
                     pwms = <&iqs620a_pwm 0 1000000>;
                     max-brightness = <255>;
             };