* [PATCH v2] ARM: dts: renesas: r9a06g032-rzn1d400-db: describe Debug LEDs
@ 2025-04-17 8:49 Wolfram Sang
2025-04-17 9:03 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2025-04-17 8:49 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Geert Uytterhoeven, Magnus Damm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
Because these LEDs are not connected to a device and have only a single
color, we don't need to specify 'color' and 'function' to distinguish
them. Even worse, that would lead to namespace collisions:
leds-gpio leds: Led green:programming renamed to green:programming_1 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_2 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_3 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_4 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_5 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_6 due to name collision
leds-gpio leds: Led green:programming renamed to green:programming_7 due to name collision
So, just let their node name (taken from the schematics) be used as a
name.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Changes since v1:
* renamed nodes to match schematics
* added default-state
* updated commit message why not more LED properties are used
.../dts/renesas/r9a06g032-rzn1d400-db.dts | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
index fef40e288679..d248ebd4bf16 100644
--- a/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
+++ b/arch/arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts
@@ -86,7 +86,50 @@ switch-8 {
debounce-interval = <20>;
gpios = <&pca9698 15 GPIO_ACTIVE_LOW>;
};
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ led-dbg0 {
+ gpios = <&pca9698 0 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg1 {
+ gpios = <&pca9698 1 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg2 {
+ gpios = <&pca9698 2 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg3 {
+ gpios = <&pca9698 3 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg4 {
+ gpios = <&pca9698 4 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg5 {
+ gpios = <&pca9698 5 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg6 {
+ gpios = <&pca9698 6 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
+
+ led-dbg7 {
+ gpios = <&pca9698 7 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ };
};
};
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ARM: dts: renesas: r9a06g032-rzn1d400-db: describe Debug LEDs
2025-04-17 8:49 [PATCH v2] ARM: dts: renesas: r9a06g032-rzn1d400-db: describe Debug LEDs Wolfram Sang
@ 2025-04-17 9:03 ` Geert Uytterhoeven
2025-04-17 9:21 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-04-17 9:03 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Geert Uytterhoeven, Magnus Damm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
Hi Wolfram,
On Thu, 17 Apr 2025 at 10:52, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Because these LEDs are not connected to a device and have only a single
> color, we don't need to specify 'color' and 'function' to distinguish
> them. Even worse, that would lead to namespace collisions:
>
> leds-gpio leds: Led green:programming renamed to green:programming_1 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_2 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_3 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_4 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_5 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_6 due to name collision
> leds-gpio leds: Led green:programming renamed to green:programming_7 due to name collision
>
> So, just let their node name (taken from the schematics) be used as a
> name.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> Changes since v1:
> * renamed nodes to match schematics
> * added default-state
> * updated commit message why not more LED properties are used
Thanks for the update!
You could still add the color properties without function properties.
However, the "function-enumerator" property exists to avoid the collisions.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] ARM: dts: renesas: r9a06g032-rzn1d400-db: describe Debug LEDs
2025-04-17 9:03 ` Geert Uytterhoeven
@ 2025-04-17 9:21 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2025-04-17 9:21 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, Geert Uytterhoeven, Magnus Damm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
> You could still add the color properties without function properties.
Tried that. Then, I get collisions because of "green_1" instead of
"green:programming_1".
> However, the "function-enumerator" property exists to avoid the collisions.
Sigh, OK.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-17 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 8:49 [PATCH v2] ARM: dts: renesas: r9a06g032-rzn1d400-db: describe Debug LEDs Wolfram Sang
2025-04-17 9:03 ` Geert Uytterhoeven
2025-04-17 9:21 ` Wolfram Sang
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).