Skip to contentSkip to conversation

dt-bindings: leds: Clearly mark label property as deprecated

PATCH In review Diederik de Haas 3 participants 6 messages Aug 15, 2025 – Aug 20, 2025

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

PATCH 1/1 dt-bindings: leds: Clearly mark label property as deprecated

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/common.yaml +1 -0
index 3e8319e44339..45ce9e13c7ff 100644
@@ -58,6 +58,7 @@ properties:
       no other LED class device can be assigned the same label. This property is
       deprecated - use 'function' and 'color' properties instead.
       function-enumerator has no effect when this property is present.
+    deprecated: true
 
   default-state:
     description:
Signature · 1 line
2.50.1
#1 lore raw
Quoted 9 lines · Diederik de Haas

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)

Please first read previous discussions:
https://lore.kernel.org/all/[email protected]/

https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

#2 lore raw
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Diederik de Haas

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

Quoted 7 lines
Quoted 5 lines
---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)

Please first read previous discussions:

[I reversed the order of the links so the oldest is first]

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Rob: "They ['function' and 'label'] serve 2 different purposes."

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Krzysztof: "I don't think there was conclusion to make it deprecated on last attempt"

I agree.
What I don't understand: Why wasn't the text updated to correct the incorrect statement about deprecation (that's how I interpret it now)? Or some other conclusion being made and that that will be reflected in the text and/or a deprecated property.

Otherwise the confusion remains and then it's just a matter of time before a 4th person comes along proposing the same patch. And possibly even more harmful: people use it incorrectly.

There's also this line:
"function-enumerator has no effect when this property is present."

if that is true, and I would assume so as that's what the binding says, then I messed up even bigger then I already think I did in commit 1631cbdb8089 ("arm64: dts: rockchip: Improve LED config for NanoPi R5S") resulting in commit
912b1f2a796e ("arm64: dts: rockchip: Drop netdev led-triggers on NanoPi R5S")

... but I'd have expected that to be pointed out in the review.

I can understand that function-enumerator is used in an automatically generated label when a label doesn't exist, but I'm inclined to think the same "They serve 2 different purposes" applies here too.

Cheers,
Diederik

#3 lore raw
Quoted 31 lines · Diederik de Haas
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Diederik de Haas

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

Quoted 7 lines
Quoted 5 lines
---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)

Please first read previous discussions:

[I reversed the order of the links so the oldest is first]

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Rob: "They ['function' and 'label'] serve 2 different purposes."

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Krzysztof: "I don't think there was conclusion to make it deprecated on last attempt"

I agree.
What I don't understand: Why wasn't the text updated to correct the incorrect statement about deprecation (that's how I interpret it now)? Or some other conclusion being made and that that will be reflected in the text and/or a deprecated property.

Quoted 3 lines

Otherwise the confusion remains and then it's just a matter of time before a 4th person comes along proposing the same patch. And possibly even more harmful: people use it incorrectly.

Whatever change you want to do here, I expect to address one way or another these previous discussions. If the code is confusing, refine the description. But not in a way which ignored previous feedbacks.

Best regards,
Krzysztof

#4 lore raw
Quoted 32 lines · Krzysztof Kozlowski
Quoted 31 lines · Diederik de Haas
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Diederik de Haas

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

Quoted 7 lines
Quoted 5 lines
---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)

Please first read previous discussions:

[I reversed the order of the links so the oldest is first]

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Rob: "They ['function' and 'label'] serve 2 different purposes."

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Krzysztof: "I don't think there was conclusion to make it deprecated on last attempt"

I agree.
What I don't understand: Why wasn't the text updated to correct the incorrect statement about deprecation (that's how I interpret it now)? Or some other conclusion being made and that that will be reflected in the text and/or a deprecated property.

Quoted 7 lines
Quoted 3 lines

Otherwise the confusion remains and then it's just a matter of time before a 4th person comes along proposing the same patch. And possibly even more harmful: people use it incorrectly.

Whatever change you want to do here, I expect to address one way or another these previous discussions. If the code is confusing, refine the description. But not in a way which ignored previous feedbacks.

I'm not going to make a change.

I thought I would be making (more) explicit what the binding says. Apparently I read/interpreted it incorrectly. What I described above is how I currently interpret the *confusion* text/discussion. Is that correct? I have no idea. That I'm at least the 3rd person proposing this change indicates I'm not the only one who is confused.

IMO it's up to a/the maintainer to make a decision and that should then be reflected in the binding, which should fix any confusion.

I hadn't looked at the code yet, but *I*IUC the code should follow the binding, not the other way around. That's how I have interpreted (mostly your) comments related to various binding patches ever since I started actively following upstream(ing) work. Which (again) may be an incorrect interpretation.

Regards,
Diederik

#5 lore raw
Quoted 49 lines · Diederik de Haas
Quoted 32 lines · Krzysztof Kozlowski
Quoted 31 lines · Diederik de Haas
Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Diederik de Haas

The text description already mentioned the label property was deprecated, but using the 'deprecated' property makes is clearer and more explicit.

Quoted 7 lines
Quoted 5 lines
---
  Documentation/devicetree/bindings/leds/common.yaml | 1 +
  1 file changed, 1 insertion(+)

Please first read previous discussions:

[I reversed the order of the links so the oldest is first]

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Rob: "They ['function' and 'label'] serve 2 different purposes."

Quoted 1 line

https://lore.kernel.org/all/[email protected]/

Krzysztof: "I don't think there was conclusion to make it deprecated on last attempt"

I agree.
What I don't understand: Why wasn't the text updated to correct the incorrect statement about deprecation (that's how I interpret it now)? Or some other conclusion being made and that that will be reflected in the text and/or a deprecated property.

Quoted 7 lines
Quoted 3 lines

Otherwise the confusion remains and then it's just a matter of time before a 4th person comes along proposing the same patch. And possibly even more harmful: people use it incorrectly.

Whatever change you want to do here, I expect to address one way or another these previous discussions. If the code is confusing, refine the description. But not in a way which ignored previous feedbacks.

I'm not going to make a change.

I thought I would be making (more) explicit what the binding says. Apparently I read/interpreted it incorrectly. What I described above is how I currently interpret the *confusion* text/discussion. Is that correct? I have no idea. That I'm at least the 3rd person proposing this change indicates I'm not the only one who is confused.

Quoted 8 lines

IMO it's up to a/the maintainer to make a decision and that should then be reflected in the binding, which should fix any confusion.

I hadn't looked at the code yet, but *I*IUC the code should follow the binding, not the other way around. That's how I have interpreted (mostly your) comments related to various binding patches ever since I started actively following upstream(ing) work. Which (again) may be an incorrect interpretation.

I think that what we are lacking to move forward is Pavel's response to Marek's question [0] about elaboration on the subject. Unless there was a response and I can't find it.

[0] https://lore.kernel.org/all/[email protected]/#t

Signature · 2 lines
Best regards,
Jacek Anaszewski