* [PATCH] dt-bindings: leds: Allow differently named multicolor leds
@ 2025-02-09 22:06 J. Neuschäfer via B4 Relay
2025-02-11 14:43 ` Lee Jones
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: J. Neuschäfer via B4 Relay @ 2025-02-09 22:06 UTC (permalink / raw)
To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andrew Davis
Cc: linux-leds, devicetree, linux-kernel, J. Neuschäfer
From: "J. Neuschäfer" <j.ne@posteo.net>
In some cases, a board may have multiple multi-leds, which can't be
distinguished by unit address. In such cases it should be possible to
name them differently, for example multi-led-a and multi-led-b.
This patch adds another node name pattern to leds-class-multicolor.yaml
to allow such names.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
---
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
index bb40bb9e036ee00e06d21e2321ecd5a7d471c408..c22af25b6430be71300c0e37f696cd61112ea190 100644
--- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
@@ -21,7 +21,9 @@ description: |
properties:
$nodename:
- pattern: "^multi-led(@[0-9a-f])?$"
+ oneOf:
+ - pattern: "^multi-led(@[0-9a-f])?$"
+ - pattern: "^multi-led-.*$"
color:
description: |
---
base-commit: 645b5c24cf8590eea322a4fd79c811817046a2e6
change-id: 20250209-multi-led-9991e205befd
Best regards,
--
J. Neuschäfer <j.ne@posteo.net>
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-09 22:06 [PATCH] dt-bindings: leds: Allow differently named multicolor leds J. Neuschäfer via B4 Relay @ 2025-02-11 14:43 ` Lee Jones 2025-02-11 18:50 ` J. Neuschäfer 2025-02-11 19:11 ` Krzysztof Kozlowski 2025-02-17 10:58 ` Krzysztof Kozlowski 2 siblings, 1 reply; 7+ messages in thread From: Lee Jones @ 2025-02-11 14:43 UTC (permalink / raw) To: j.ne Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, linux-leds, devicetree, linux-kernel On Sun, 09 Feb 2025, J. Neuschäfer via B4 Relay wrote: > From: "J. Neuschäfer" <j.ne@posteo.net> > > In some cases, a board may have multiple multi-leds, which can't be > distinguished by unit address. In such cases it should be possible to > name them differently, for example multi-led-a and multi-led-b. > This patch adds another node name pattern to leds-class-multicolor.yaml > to allow such names. Which H/W needs this? Is it upstream? Where is the doc / usage? > Signed-off-by: J. Neuschäfer <j.ne@posteo.net> > --- > Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > index bb40bb9e036ee00e06d21e2321ecd5a7d471c408..c22af25b6430be71300c0e37f696cd61112ea190 100644 > --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > @@ -21,7 +21,9 @@ description: | > > properties: > $nodename: > - pattern: "^multi-led(@[0-9a-f])?$" > + oneOf: > + - pattern: "^multi-led(@[0-9a-f])?$" > + - pattern: "^multi-led-.*$" > > color: > description: | > > --- > base-commit: 645b5c24cf8590eea322a4fd79c811817046a2e6 > change-id: 20250209-multi-led-9991e205befd > > Best regards, > -- > J. Neuschäfer <j.ne@posteo.net> > > -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-11 14:43 ` Lee Jones @ 2025-02-11 18:50 ` J. Neuschäfer 2025-02-11 19:10 ` Krzysztof Kozlowski 0 siblings, 1 reply; 7+ messages in thread From: J. Neuschäfer @ 2025-02-11 18:50 UTC (permalink / raw) To: Lee Jones Cc: j.ne, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, linux-leds, devicetree, linux-kernel On Tue, Feb 11, 2025 at 02:43:00PM +0000, Lee Jones wrote: > On Sun, 09 Feb 2025, J. Neuschäfer via B4 Relay wrote: > > > From: "J. Neuschäfer" <j.ne@posteo.net> > > > > In some cases, a board may have multiple multi-leds, which can't be > > distinguished by unit address. In such cases it should be possible to > > name them differently, for example multi-led-a and multi-led-b. > > This patch adds another node name pattern to leds-class-multicolor.yaml > > to allow such names. > > Which H/W needs this? Is it upstream? Where is the doc / usage? I encountered this situation while upstreaming the LANCOM NWAPP2 board, which has multiple LED-group-based multicolor LEDs: https://lore.kernel.org/lkml/20250102-mpc83xx-v1-16-86f78ba2a7af@posteo.net/ Since they are based on leds-group-multicolor, they don't have a unit address, but there is more than one on the same level (as direct sub-nodes of the DT root node). I can add a comment about node names, if that's desired, e.g.: If multiple multi-color LEDs exist on the same level, they can be differentiated by unit-address (e.g. multi-led@abc0) or name (e.g. multi-led-power). Such as a comment doesn't exist currently either; the existing "^multi-led(@[0-9a-f])?$" pattern is not documented in prose. Best regards, J. Neuschäfer > > > Signed-off-by: J. Neuschäfer <j.ne@posteo.net> > > --- > > Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 4 +++- [...] > > + - pattern: "^multi-led(@[0-9a-f])?$" > > + - pattern: "^multi-led-.*$" ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-11 18:50 ` J. Neuschäfer @ 2025-02-11 19:10 ` Krzysztof Kozlowski 2025-02-16 18:49 ` J. Neuschäfer 0 siblings, 1 reply; 7+ messages in thread From: Krzysztof Kozlowski @ 2025-02-11 19:10 UTC (permalink / raw) To: J. Neuschäfer, Lee Jones Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, linux-leds, devicetree, linux-kernel On 11/02/2025 19:50, J. Neuschäfer wrote: > On Tue, Feb 11, 2025 at 02:43:00PM +0000, Lee Jones wrote: >> On Sun, 09 Feb 2025, J. Neuschäfer via B4 Relay wrote: >> >>> From: "J. Neuschäfer" <j.ne@posteo.net> >>> >>> In some cases, a board may have multiple multi-leds, which can't be >>> distinguished by unit address. In such cases it should be possible to >>> name them differently, for example multi-led-a and multi-led-b. >>> This patch adds another node name pattern to leds-class-multicolor.yaml >>> to allow such names. >> >> Which H/W needs this? Is it upstream? Where is the doc / usage? > > I encountered this situation while upstreaming the LANCOM NWAPP2 board, > which has multiple LED-group-based multicolor LEDs: > > https://lore.kernel.org/lkml/20250102-mpc83xx-v1-16-86f78ba2a7af@posteo.net/ Which LEDs are these? I don't see multi-led there node name at all. This patch must come with user. It's fine to send the user separately, but please provide lore link to exact user. Otherwise what certainty we have that this change is needed in the first place? > > Since they are based on leds-group-multicolor, they don't have a unit > address, but there is more than one on the same level (as direct > sub-nodes of the DT root node). Which binding is this? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-11 19:10 ` Krzysztof Kozlowski @ 2025-02-16 18:49 ` J. Neuschäfer 0 siblings, 0 replies; 7+ messages in thread From: J. Neuschäfer @ 2025-02-16 18:49 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: J. Neuschäfer, Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis, linux-leds, devicetree, linux-kernel On Tue, Feb 11, 2025 at 08:10:28PM +0100, Krzysztof Kozlowski wrote: > On 11/02/2025 19:50, J. Neuschäfer wrote: > > On Tue, Feb 11, 2025 at 02:43:00PM +0000, Lee Jones wrote: > >> On Sun, 09 Feb 2025, J. Neuschäfer via B4 Relay wrote: > >> > >>> From: "J. Neuschäfer" <j.ne@posteo.net> > >>> > >>> In some cases, a board may have multiple multi-leds, which can't be > >>> distinguished by unit address. In such cases it should be possible to > >>> name them differently, for example multi-led-a and multi-led-b. > >>> This patch adds another node name pattern to leds-class-multicolor.yaml > >>> to allow such names. > >> > >> Which H/W needs this? Is it upstream? Where is the doc / usage? > > > > I encountered this situation while upstreaming the LANCOM NWAPP2 board, > > which has multiple LED-group-based multicolor LEDs: > > > > https://lore.kernel.org/lkml/20250102-mpc83xx-v1-16-86f78ba2a7af@posteo.net/ > > Which LEDs are these? These and a few more: led-power { label = "multicolor:power"; compatible = "leds-group-multicolor"; color = <LED_COLOR_ID_MULTI>; function = LED_FUNCTION_POWER; leds = <&led_power_red>, <&led_power_green>; }; led-wlan-link { label = "multicolor:wlan-link"; compatible = "leds-group-multicolor"; color = <LED_COLOR_ID_MULTI>; function = LED_FUNCTION_WLAN; leds = <&led_wlan_link_red>, <&led_wlan_link_green>; }; According to the leds-class-multicolor.yaml binding, they should be named "multi-led", optionally with a unit address. Unit addresses don't make a lot of sense, as these nodes don't have (or need) a reg property. They can't, however, have the same name, which brings me to the idea of this patch: To allow different names that start with "multi-led-". > I don't see multi-led there node name at all. This was my mistake while writing the NWAPP2 devicetree. > > This patch must come with user. It's fine to send the user separately, > but please provide lore link to exact user. > > Otherwise what certainty we have that this change is needed in the first > place? For ease of review, I'll include this patch in v2 of the NWAPP2 series, and extend the commit message. > > > > > Since they are based on leds-group-multicolor, they don't have a unit > > address, but there is more than one on the same level (as direct > > sub-nodes of the DT root node). > > Which binding is this? Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml specifies compatible = "leds-group-multicolor", and includes: Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml defines node name pattern of "^multi-led(@[0-9a-f])?$" Best regards, J. Neuschäfer ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-09 22:06 [PATCH] dt-bindings: leds: Allow differently named multicolor leds J. Neuschäfer via B4 Relay 2025-02-11 14:43 ` Lee Jones @ 2025-02-11 19:11 ` Krzysztof Kozlowski 2025-02-17 10:58 ` Krzysztof Kozlowski 2 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2025-02-11 19:11 UTC (permalink / raw) To: j.ne, Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis Cc: linux-leds, devicetree, linux-kernel On 09/02/2025 23:06, J. Neuschäfer via B4 Relay wrote: > From: "J. Neuschäfer" <j.ne@posteo.net> > > In some cases, a board may have multiple multi-leds, which can't be > distinguished by unit address. In such cases it should be possible to > name them differently, for example multi-led-a and multi-led-b. > This patch adds another node name pattern to leds-class-multicolor.yaml > to allow such names. > > Signed-off-by: J. Neuschäfer <j.ne@posteo.net> > --- > Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > index bb40bb9e036ee00e06d21e2321ecd5a7d471c408..c22af25b6430be71300c0e37f696cd61112ea190 100644 > --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > @@ -21,7 +21,9 @@ description: | > > properties: > $nodename: > - pattern: "^multi-led(@[0-9a-f])?$" > + oneOf: > + - pattern: "^multi-led(@[0-9a-f])?$" > + - pattern: "^multi-led-.*$" I don't see any bindings using this or allowing this. If this is because of some new binding, it is supposed to be part of that patchset. Otherwise please provide reference which binding needs this. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds 2025-02-09 22:06 [PATCH] dt-bindings: leds: Allow differently named multicolor leds J. Neuschäfer via B4 Relay 2025-02-11 14:43 ` Lee Jones 2025-02-11 19:11 ` Krzysztof Kozlowski @ 2025-02-17 10:58 ` Krzysztof Kozlowski 2 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2025-02-17 10:58 UTC (permalink / raw) To: j.ne, Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis Cc: linux-leds, devicetree, linux-kernel On 09/02/2025 23:06, J. Neuschäfer via B4 Relay wrote: > From: "J. Neuschäfer" <j.ne@posteo.net> > > In some cases, a board may have multiple multi-leds, which can't be > distinguished by unit address. In such cases it should be possible to > name them differently, for example multi-led-a and multi-led-b. > This patch adds another node name pattern to leds-class-multicolor.yaml > to allow such names. > > Signed-off-by: J. Neuschäfer <j.ne@posteo.net> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-17 10:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-09 22:06 [PATCH] dt-bindings: leds: Allow differently named multicolor leds J. Neuschäfer via B4 Relay 2025-02-11 14:43 ` Lee Jones 2025-02-11 18:50 ` J. Neuschäfer 2025-02-11 19:10 ` Krzysztof Kozlowski 2025-02-16 18:49 ` J. Neuschäfer 2025-02-11 19:11 ` Krzysztof Kozlowski 2025-02-17 10:58 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).