| Message ID | 179489221679.1.1429296960451969532.led-label-policy-rfc@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27760-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 6B6A51C802B for <noreply@patchwork.local>; Tue, 17 Nov 2026 06:11:05 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27760-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27760-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id A71BA33904 for <noreply@patchwork.local>; Tue, 17 Nov 2026 05:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794892223; b=xZ8jNTZ5XWtwn8/tuzrPQ3E5TChhUlqtIcs6TmvAIzTM936kjiq99gau0DDvYno0HPJr LFQqwD8WNtIen15xWCty13/paPd6Ig18U9MZDC3znoSxPFR+rHPMLU/RbYryY2qM6fs2/ nHM/0XcEkcLZ0J/EF5Zj0S/YEFa95kXIN2iDfk2nf8rfmdERn2Uj3qDVV/oO0SwOfErmO mCSKvvUxTlkR7q5rGl5mD2TuhW4K4YIfoJrPTH1GNNpUDMvcfRqY41u+ZgWHh9MyafANn 9LElD5srckYNpOoXUM/etrDSVFSKAthjaCHtYeUZcwolqRLE9q94c5KebFwmwTxhxHg== ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794892223; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:To:Cc: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:Date: Message-ID:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To: Content-Transfer-Encoding; bh=RRjbzyTimWQxTJrhIgcvAax5Lb9Qz/LwWuZkxpcO20g=; b=q2Aby7DbB56fcoDiJkW/1NKEf5IjZL0eom7QjoYJ4Coqy/kNnQc985gyLoWowbTfpALC Rm6k4aibuLTZkZGmH//1EZJW63M9rfJwFYPY3bn5emgmR1yBNGSCxWtoHEQTSj+o2acg0 Or8OR2ir+GWzJT4lt9b84gQVOapVD081JfO41G7kM9KtfK9/qdWvtvL5qs25K/jDg6Dhl V++58ub9CFO90N1AF7hnEroiJE4AfTqT2HC1Amnjg8mUHd85c3tpwis+OKlTXgrLoZrJ2 p27h70hpT2r45qGBLMWXjzDQqTDrbE9CTUjcKaEF7/ehQrVsAkVv/jZ0s/4E0cnhj5A== ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l1KSRpg4; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62533606A329; Tue, 17 Nov 2026 05:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l1KSRpg4 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794892223; b=qBxJnTu/I6X+vE3O5y/rJC7OKgsu0eKXE8t3TgxyCgSjZxGC2VknY09d+Lyjc0AeVJ+f TVT2hqYqejC86a5bLxKPN9fx4u15ZQUTCXzaW0I/Ycm1UyQhX7persAAp19WtJ4QdbNN6 RuAIS2JUmygSPX4SgIQIsHBQ9ktUIyBZXBdjrmXEPipG3tyR7RDfYZCjIkcXd9PXG6G8/ 6dxYC/iXQctBJu/hHme3IBY6mFaGNgHsW8Xhkg1G5h9gg2xgKk2p5ONtKDj7pdl7iIqy0 Xv35EXX11BdtkBy3rQlifDdcMpxO3cULk99YwZjXQlxbjL1ZJihGjvDPxWIhzGelg3w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794892223; h=Received:DKIM-Signature:Received:From:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID:X-Mailer:X-Developer-Signature: X-Developer-Key:X-Endpoint-Received:X-Original-From:Reply-To: Content-Transfer-Encoding; bh=RRjbzyTimWQxTJrhIgcvAax5Lb9Qz/LwWuZkxpcO20g=; b=eIzEc7/yE+bAE/aJygoXY+hcIdNqPdLHBkbHqXBImYX+SSUiSTMwbmIMK4cmCIyaZp20 KRmUDm+oS+lp4xxZqgevct+RzIQKb8lqJT7VAz93RXTZw2w28evCR4vjpf8HL3hf3Dqio ZHdBGpgzQWxyenItBlueevh6rrAp6zn9SrAS/NIvL8Pb6aSNkmJIjxV9ZxLQ6jJo5aqX+ PBQUR+SApX/rlfcMq/Ff6xLWIXVqnDhjJ43oD9MpF2D0zExzM0W+UJTCYV+fJ2zea67eo OY0C9we9dCPa2dJo8PytW8X0frLyJLXyJXIVXX0mAPQ9zKwQWZPptDlqLDgDCVpz/Rg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l1KSRpg4; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F790606A32C; Tue, 17 Nov 2026 05:10:23 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1794892223; b=U/XNVTAkdEXEHEb4UWz4PaQJRG6zGvvH98G0+FbBAYAyB2iju/PrCxXknK4bOvvL9f/q KIxaDg9EDM+qfJhzWbxCs6cc7bcTHPTqy9GtWhwtjR1w/XC3r0ZzQK527mi9Ef5+qrrjB Cjtsx2PBGlqf+umdBpECpu5xsq/pcZj6zJ8aNs/g+lfHfcl4Cn9DjwKy7NavTbA7ngjnv HaOf3BCYgUbCnrBVWbKJM5+vgnvdTdVEsGTiGfM0p/+hGfIbSm5U5TvGM2Q0z/9iEJUIn ezAwhE1CaTtgmCF2e3Hl6Pq8tsbZnfuw9AJpD/fEpyTv5UzxNmnpT4u+SLYjSIzunvw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1794892223; h=DKIM-Signature:Received:From:To:Cc:Subject:MIME-Version:Content-Type: Date:Message-ID:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To: Content-Transfer-Encoding; bh=RRjbzyTimWQxTJrhIgcvAax5Lb9Qz/LwWuZkxpcO20g=; b=il0O7rS5kg76sY187SmH+g6BS1humd6mzRw8LmKfT9dKZd7npUhu6wgbxdCVuTSf8Q5y lQFClg8IB05ak6sRLX98HwhlVkTREv2MuUYmfUOm7GUoEXhS+DYGGrPxCG06PCI7aWsii 4EPpXlJLIsPgbgTdtfe1qb/DDGeP++EMtJb0dwH5OBR0cRJqdY+c/krrcn7R0h1/HOPXN nWMkAL9WRWPXculOuH2021pSB6Jd2cAjYmVGstVPYgWF3QmAvYwifVh55CQSKqS+aHGaT Jaod7xoRPuOo6rsqyzvpDmdemVaNFIDDlXhfGKvMQOSAbTOIfjhT4oXgGX597LWRRiA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 910D91F000C4; Tue, 17 Nov 2026 05:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794892223; bh=RRjbzyTimWQxTJrhIgcvAax5Lb9Qz/LwWuZkxpcO20g=; h=From:To:Cc:Subject:Date:Reply-To; b=l1KSRpg4E7h0I/Yd1aP+MxC0M4E30OKqSsF3BOu/l8WAS2tz+PUpWcJQKA1qTOpGk jEqgxEtF2cNn6pGYIbRq4f2vICK0JyxtI7AryEpRkkPaLHoljl6X8tRTiIA41kPCkz RKW9yhYM/JuV00r2+8JtiGh33p89xkjTRUpIVjSLnlNmcH+jjgD0D5nd+djN3WvM94 HkGjVycJjIkQBW8kmr2QBootNjcXoqO97ACFggKIsdI49PRo6j5hwsABDej0sN/JyM XOGsyB+l8gc3BlvvbniNHX4BCHIrVxZERFZP271rkdjZVFeZU0z+bYJOko5EQehg1k 5QDTtNkheDxGQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id E46014A6C5; Tue, 17 Nov 2026 05:10:21 +0000 (UTC) From: Cristian Filipescu via B4 Relay <devnull+filipescu.cristian.gmail.com@kernel.org> To: linux-leds@vger.kernel.org, devicetree@vger.kernel.org Cc: Lee Jones <lee@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: [PATCH RFC] leds: DT: migrating existing labels to function/color X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Post: <mailto:linux-sunxi@lists.linux.dev> List-Help: <mailto:linux-sunxi+help@lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev> Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Date: Tue, 17 Nov 2026 05:10:16 +0000 Message-ID: <179489221679.1.1429296960451969532.led-label-policy-rfc@gmail.com> X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1794892216; l=3129; i=filipescu.cristian@gmail.com; s=uboot-20261021; h=from:subject:message-id; bh=yDEyHZ0vBr1PYekgAZguFVDD5Tfxmd/H6LQWci3XaNg=; b=32idoKYdXJ1Ued9e/Rgjim6ANtMlStXIm10OgKqlPw2EMFMZ/SznqoucCcuTAOxOsu0hQZisi jDVVG9zh0wMAOikJzP57ueY4ADZfIgpij6bsK1fqzx34t2eJlqUtHpO X-Developer-Key: i=filipescu.cristian@gmail.com; a=ed25519; pk=o7Ui0tU3x+X/6Pq6PZHmd2KFtOdPWttoPuNFOvdD8t0= X-Endpoint-Received: by B4 Relay for filipescu.cristian@gmail.com/uboot-20261021 with auth_id=1255 X-Original-From: Cristian Filipescu <filipescu.cristian@gmail.com> Reply-To: filipescu.cristian@gmail.com Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.19 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; ARC_ALLOW(-1.00)[kernel.org:s=arc20260519:i=3]; R_SPF_ALLOW(-0.20)[+ip4:172.234.253.10]; R_DKIM_ALLOW(-0.20)[kernel.org:s=k20260515]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; RBL_VIRUSFREE_UNKNOWN_FAIL(0.00)[172.234.253.10:query timed out]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; FREEMAIL_REPLYTO(0.00)[gmail.com]; TAGGED_RCPT(0.00)[dt]; DBL_FAIL(0.00)[sea.lore.kernel.org:query timed out]; DMARC_DNSFAIL(0.00)[kernel.org : query timed out]; BLOCKLISTDE_FAIL(0.00)[100.103.45.18:query timed out,100.77.114.92:query timed out,172.234.253.10:query timed out,100.80.115.77:query timed out]; FREEMAIL_CC(0.00)[kernel.org,kroah.com,gmail.com,sholland.org,lists.linux.dev]; RCPT_COUNT_TWELVE(0.00)[12]; SPAMHAUS_FAIL(0.00)[100.103.45.18:query timed out,100.77.114.92:query timed out,100.80.115.77:query timed out,172.234.253.10:query timed out]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; DKIM_TRACE(0.00)[kernel.org:+]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RBL_SENDERSCORE_FAIL(0.00)[172.234.253.10:query timed out]; TAGGED_FROM(0.00)[bounces-27760-noreply=patchwork.local,filipescu.cristian.gmail.com]; FORGED_SENDER_MAILLIST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[devnull@kernel.org,linux-sunxi@lists.linux.dev]; HAS_REPLYTO(0.00)[filipescu.cristian@gmail.com] X-Rspamd-Queue-Id: 6B6A51C802B X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX |
| Series |
[RFC] leds: DT: migrating existing labels to function/color
|
|
Commit Message
Cristian Filipescu via B4 Relay
Nov. 17, 2026, 5:10 a.m. UTC
From: Cristian Filipescu <filipescu.cristian@gmail.com>
Hi,
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?
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
Comments
Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] arm64: dts: allwinner: missing Signed-off-by trailer and RFC commit format - [Medium] arm64: dts: allwinner: removing LED label changes sysfs and GPIO names - [Low] arm64: dts: allwinner: inaccurate DTB count and Orange Pi 3 LTS claim in log -- commit 9235c19cbef601645f52663823784ba072327e48 Author: Cristian Filipescu <filipescu.cristian@gmail.com> > leds: DT: migrating existing labels to function/color > > Hi, > > 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? > > 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. [Severity: Low] Is the list of four affected DTBs accurate? arch/arm64/boot/dts/allwinner/Makefile only builds three H6 Orange Pi DTBs: sun50i-h6-orangepi-3.dtb (from sun50i-h6-orangepi-3.dts) and sun50i-h6-orangepi-lite2.dtb and sun50i-h6-orangepi-one-plus.dtb (which include sun50i-h6-orangepi.dtsi). There is no Orange Pi 3 LTS device tree in the kernel tree. > 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 [Severity: High] This commit has no Signed-off-by: trailer, uses an RFC email body instead of a declarative changelog, and uses "leds: DT: ..." rather than the "arm64: dts: allwinner: h6: ..." subject prefix. > 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 ce82aa265cfd1..8e411705769b1 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 */ > }; > }; [Severity: Medium] Does removing label here and in sun50i-h6-orangepi.dtsi cause a userspace regression by renaming the sysfs entries and GPIO consumer names? When gpio_leds_create() registers these nodes without label, led_compose_name() formats the LED names as "red:power" and "green:status" instead of "orangepi:red:power" and "orangepi:green:status", and passes the new kobject name to gpiod_set_consumer_name(). That breaks userspace scripts and board configurations that rely on the existing /sys/class/leds/ paths and GPIO consumer labels on Orange Pi 3, Lite2, and One Plus. Documentation/devicetree/bindings/leds/common.yaml leaves "deprecated: true" off the label property so existing device trees can keep their established names without dtbs_check warnings. Note also that adding function alongside an existing label has no effect, because led_parse_fwnode_props() returns immediately after reading label: drivers/leds/led-core.c:led_parse_fwnode_props() { ... if (fwnode_property_present(fwnode, "label")) { ret = fwnode_property_read_string(fwnode, "label", &props->label); if (ret) dev_err(dev, "Error parsing 'label' property (%d)\n", ret); return; } ... }
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 */ > }; > }; > >
Hi Lee, This is not a patch, but just an example of what it might look like if I submitted patches to change all the LEDs. I didn't know whether it was desirable to switch all the old LED labels to the new format. But now I have my answer, and I will not submit any patch to change the LED labels. Regards, Cristian Filipescu ------------------------------------ On Thu, Nov 19, 2026 at 12:02 PM Lee Jones <lee@kernel.org> wrote: > > 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
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 */ }; };