Thread (11 messages) 11 messages, 3 authors, 2024-04-01

Re: [PATCH net-next v2 7/7] arm: boot: dts: mvebu: linksys-mamba: Add Ethernet LEDs

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2024-03-31 16:35:45


On 3/30/2024 11:32 AM, Andrew Lunn wrote:
List the front panel Ethernet LEDs in the switch section of the
device tree. They can then be controlled via /sys/class/led/

The node contains a label property to influence the name of the LED.
Without it, all the LEDs get the name lan:white, which classes, and so
some get a number appended. lan:white_1, lan:white_2, etc. Using the
label the LEDs are named lan1:front, lan2:front, lan3:front, where
lanX indicates the interface name, and front indicates they are on the
front of the box.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
[snip]
  			ethernet-port@4 {
  				reg = <4>;
  				label = "internet";
+
+				leds {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					led@0 {
+						reg = <0>;
+						color = <LED_COLOR_ID_WHITE>;
+						function = LED_FUNCTION_LAN;
Should this be LED_FUNCTION_WAN since this is the "internet" label?
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help