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@xxxxxxxxxx> > >>> > >>> 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@xxxxxxxxxx/ > > 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