All of lore.kernel.org
 help / color / mirror / Atom feed
* How to name multiple LEDs of the same type and color
@ 2020-09-19 21:21 Adrian Schmutzler
  2020-09-20  1:17 ` Marek Behun
  2020-09-20 11:08 ` Pavel Machek
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian Schmutzler @ 2020-09-19 21:21 UTC (permalink / raw)
  To: linux-leds

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

Hi,

I wonder what would be the correct way to deal with a set of LEDs with the same color/function combination, e.g.

	leds {
		compatible = "gpio-leds";

		link1 {
			function = LED_FUNCTION_RSSI;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
		};

		link2 {
			function = LED_FUNCTION_RSSI;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
		};

		link3 {
			function = LED_FUNCTION_RSSI;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
		};
	};

or

	leds {
		compatible = "gpio-leds";

		lan1 {
			function = LED_FUNCTION_LAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
		};
		lan2 {
			function = LED_FUNCTION_LAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
		};
		lan3 {
			function = LED_FUNCTION_LAN;
			color = <LED_COLOR_ID_GREEN>;
			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
		};
	};

These nodes will automatically create names like green:lan, green:lan_1, etc.

Is there a way to force a certain numbering scheme, e.g.
green:lan1, green:lan2, etc.
?

(For the RSSI leds, we currently even have stuff like ...:green:rssilow, ...:green:rssimedium, etc. in the label now)

How does this match into the color/function concept?

Thanks for some pointers ...

Best

Adrian

[-- Attachment #2: openpgp-digital-signature.asc --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-21  9:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 21:21 How to name multiple LEDs of the same type and color Adrian Schmutzler
2020-09-20  1:17 ` Marek Behun
2020-09-20 11:08 ` Pavel Machek
2020-09-20 23:31   ` Adrian Schmutzler
2020-09-21  1:00     ` Marek Behun
2020-09-21  8:31       ` Pavel Machek
2020-09-21  9:49         ` Adrian Schmutzler

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.