All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer" <j.ne@posteo.net>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "J. Neuschäfer" <j.ne@posteo.net>, "Lee Jones" <lee@kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>, "Andrew Davis" <afd@ti.com>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: leds: Allow differently named multicolor leds
Date: Sun, 16 Feb 2025 18:49:59 +0000	[thread overview]
Message-ID: <Z7IzV15IVizOQxu4@probook> (raw)
In-Reply-To: <de7fb605-527e-4c62-9b5d-947a1636c54b@kernel.org>

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

  reply	other threads:[~2025-02-16 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 22:06 [PATCH] dt-bindings: leds: Allow differently named multicolor leds J. Neuschäfer
2025-02-09 22:06 ` 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 [this message]
2025-02-11 19:11 ` Krzysztof Kozlowski
2025-02-17 10:58 ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z7IzV15IVizOQxu4@probook \
    --to=j.ne@posteo.net \
    --cc=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.