Devicetree
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: filipescu.cristian@gmail.com
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	Pavel Machek <pavel@kernel.org>,
	Griffin Kroah-Hartman <griffin@kroah.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	linux-sunxi@lists.linux.dev
Subject: Re: [PATCH RFC] leds: DT: migrating existing labels to function/color
Date: Thu, 19 Nov 2026 19:02:09 +0000	[thread overview]
Message-ID: <179510277952.63755.11124972443142013738@kernel.org> (raw)
In-Reply-To: <179489221679.1.1429296960451969532.led-label-policy-rfc@gmail.com>

I'm not exactly sure what to do with this patch, but not a patch, submission?

Sashiko already had some things to say.

> From: Cristian Filipescu <filipescu.cristian@gmail.com>
>
> Hi,

This does not belong in a commit message.

> The common LED binding deprecates label in favour of function and color.
> Is removing existing labels desirable when it changes established LED class
> names, or should existing board descriptions retain them for compatibility?

Removing existing 'label' properties will change the sysfs directory
names under /sys/class/leds/ and risk breaking existing user-space tools
and scripts that rely on them.  Existing board descriptions should
retain their 'label' properties for backwards compatibility, though
'function' and 'color' can be used for any newly added nodes.

> For example, the Orange Pi H6 descriptions could replace their labels with
> LED_FUNCTION_POWER/STATUS and LED_COLOR_ID_RED/GREEN. With gpio-leds, this
> would change the names under /sys/class/leds:
>
>   orangepi:red:power    -> red:power
>   orangepi:green:status -> green:status
>
> The example below changes two files and affects Orange Pi 3, 3 LTS, Lite2
> and One Plus. GPIOs, polarity, pinctrl, defaults and triggers are unchanged.
> All four DTBs compile before and after; comparison found only the intended
> label/function/color changes. The renamed LEDs have not been tested on
> hardware.
>
> I was thinking of converting all the deprecated LED labels, but I wanted
> to see if this was something maintainers wanted, since it would touch a lot
> of files. Would you prefer retaining existing labels (potentially adding
> function and color alongside them), or reviewing migrations with the name
> changes explicitly documented?
>
> This is a discussion example, not a patch for inclusion. Preparation and
> static checks were assisted by OpenAI Codex.
>
> Thanks,
> Cristian

This does not constitute as a SoB.

> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> index ce82aa265..8e4117057 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> @@ -8,6 +8,7 @@
>  #include "sun50i-h6-gpu-opp.dtsi"
>
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
>
>  / {
>  	model = "OrangePi 3";
> @@ -45,13 +46,15 @@ leds {
>  		compatible = "gpio-leds";
>
>  		led-0 {
> -			label = "orangepi:red:power";
> +			function = LED_FUNCTION_POWER;
> +			color = <LED_COLOR_ID_RED>;
>  			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
>  			default-state = "on";
>  		};
>
>  		led-1 {
> -			label = "orangepi:green:status";
> +			function = LED_FUNCTION_STATUS;
> +			color = <LED_COLOR_ID_GREEN>;
>  			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
>  		};
>  	};
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
> index 57b137755..49f3d2fc8 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
> @@ -9,6 +9,7 @@
>  #include "sun50i-h6-gpu-opp.dtsi"
>
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
>
>  / {
>  	model = "OrangePi One Plus";
> @@ -45,13 +46,15 @@ leds {
>  		compatible = "gpio-leds";
>
>  		led-0 {
> -			label = "orangepi:red:power";
> +			function = LED_FUNCTION_POWER;
> +			color = <LED_COLOR_ID_RED>;
>  			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
>  			default-state = "on";
>  		};
>
>  		led-1 {
> -			label = "orangepi:green:status";
> +			function = LED_FUNCTION_STATUS;
> +			color = <LED_COLOR_ID_GREEN>;
>  			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
>  		};
>  	};
>
>

-- 
Lee Jones

  parent reply	other threads:[~2026-11-19 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  5:10 [PATCH RFC] leds: DT: migrating existing labels to function/color Cristian Filipescu via B4 Relay
2026-11-17  5:20 ` sashiko-bot
2026-11-19 19:02 ` Lee Jones [this message]
2026-11-19 19:23   ` Cristian Filipescu

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=179510277952.63755.11124972443142013738@kernel.org \
    --to=lee@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=filipescu.cristian@gmail.com \
    --cc=griffin@kroah.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox