Skip to contentSkip to conversation

dt-bindings: leds: add LED_FUNCTION_* mainly for router devices

PATCH Superseded INAGAKI Hiroshi 2 participants 6 messages Mar 20, 2024 – Mar 22, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover dt-bindings: leds: add LED_FUNCTION_* mainly for router devices

This patch series adds some LED_FUNCTION_* definitions mainly for router devices.
Those definitions are useful for OpenWrt or something.

INAGAKI Hiroshi (2):
dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile network
dt-bindings: leds: add LED_FUNCTION_SPEED_* for link speed on LAN/WAN

 include/dt-bindings/leds/common.h | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile network

Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network connection.
As an example, "Mobile" LEDs on IIJ SA-W2 indicate status (no signal, too low, low, good) of mobile network connection via dongle connected to USB port.

---
 include/dt-bindings/leds/common.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/leds/common.h +1 -0
index ecea167930d9..d4b8498bde7f 100644
@@ -91,6 +91,7 @@
 #define LED_FUNCTION_LAN "lan"
 #define LED_FUNCTION_MAIL "mail"
 #define LED_FUNCTION_MTD "mtd"
+#define LED_FUNCTION_MOBILE "mobile"
 #define LED_FUNCTION_PANIC "panic"
 #define LED_FUNCTION_PROGRAMMING "programming"
 #define LED_FUNCTION_RX "rx"
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [PATCH 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile network

Quoted 17 lines · INAGAKI Hiroshi

Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network connection.
As an example, "Mobile" LEDs on IIJ SA-W2 indicate status (no signal, too low, low, good) of mobile network connection via dongle connected to USB port.

---
 include/dt-bindings/leds/common.h | 1 +
 1 file changed, 1 insertion(+)
include/dt-bindings/leds/common.h +0 -0
index ecea167930d9..d4b8498bde7f 100644

include/dt-bindings/leds/common.h line 94

Quoted 4 lines
include/dt-bindings/leds/common.h +1 -0
@@ -91,6 +91,7 @@
 #define LED_FUNCTION_LAN "lan"
 #define LED_FUNCTION_MAIL "mail"
 #define LED_FUNCTION_MTD "mtd"
+#define LED_FUNCTION_MOBILE "mobile"

Why doesn't "wan" work?

Quoted 6 lines
include/dt-bindings/leds/common.h +0 -0
 #define LED_FUNCTION_PANIC "panic"
 #define LED_FUNCTION_PROGRAMMING "programming"
 #define LED_FUNCTION_RX "rx"
Signature · 1 line
2.25.1
#3 lore raw

Re: [PATCH 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile network

Hello Rob Herring,

thank you for your review.

Quoted 13 lines · Rob Herring
Quoted 12 lines · INAGAKI Hiroshi

Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network connection.
As an example, "Mobile" LEDs on IIJ SA-W2 indicate status (no signal, too low, low, good) of mobile network connection via dongle connected to USB port.

---
  include/dt-bindings/leds/common.h | 1 +
  1 file changed, 1 insertion(+)
Quoted 10 lines

include/dt-bindings/leds/common.h line 94

Quoted 9 lines
include/dt-bindings/leds/common.h +1 -0
index ecea167930d9..d4b8498bde7f 100644
@@ -91,6 +91,7 @@
  #define LED_FUNCTION_LAN "lan"
  #define LED_FUNCTION_MAIL "mail"
  #define LED_FUNCTION_MTD "mtd"
+#define LED_FUNCTION_MOBILE "mobile"

Why doesn't "wan" work?

To distinguish the LEDs of mobile connection from the LEDs of wired wan connection.
For example, IIJ SA-W2 also supports wan connection via the ethernet port "GE0" (WAN) in addition to mobile network. If "wan" is used, it may confuse users as to which connection the LED is for.

BTW: _MOBILE should be placed before _MTD for alphabetical order, I'll fix it and send v2 patch series...

Quoted 7 lines
Quoted 7 lines
include/dt-bindings/leds/common.h +0 -0
  #define LED_FUNCTION_PANIC "panic"
  #define LED_FUNCTION_PROGRAMMING "programming"
  #define LED_FUNCTION_RX "rx"
Signature · 1 line
2.25.1

Thanks,
Hiroshi

#4 lore raw

PATCH 2/2 dt-bindings: leds: add LED_FUNCTION_SPEED_* for link speed on LAN/WAN

In reply to INAGAKI Hiroshi

Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that indicate link speed of ethernet ports on LAN/WAN. This is useful to distinguish those LEDs from LEDs that indicate link status (up/down).

example:

Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each of the ethernet ports in addition to LEDs that indicate link status (up/down).

- 1000 Mbps: green:speed-(lan|wan)-N
- 100 Mbps: amber:speed-(lan|wan)-N
- 10 Mbps: (none, turned off)

---
 include/dt-bindings/leds/common.h | 2 ++
 1 file changed, 2 insertions(+)
include/dt-bindings/leds/common.h +2 -0
index d4b8498bde7f..8d446cf88b4c 100644
@@ -96,6 +96,8 @@
 #define LED_FUNCTION_PROGRAMMING "programming"
 #define LED_FUNCTION_RX "rx"
 #define LED_FUNCTION_SD "sd"
+#define LED_FUNCTION_SPEED_LAN "speed-lan"
+#define LED_FUNCTION_SPEED_WAN "speed-wan"
 #define LED_FUNCTION_STANDBY "standby"
 #define LED_FUNCTION_TORCH "torch"
 #define LED_FUNCTION_TX "tx"
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link speed on LAN/WAN

Quoted 14 lines · INAGAKI Hiroshi

Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that indicate link speed of ethernet ports on LAN/WAN. This is useful to distinguish those LEDs from LEDs that indicate link status (up/down).

example:

Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each of the ethernet ports in addition to LEDs that indicate link status (up/down).

- 1000 Mbps: green:speed-(lan|wan)-N

(quoted diff) +0 -2
-  100 Mbps: amber:speed-(lan|wan)-N
-   10 Mbps: (none, turned off)
Quoted 5 lines
---
 include/dt-bindings/leds/common.h | 2 ++
 1 file changed, 2 insertions(+)