diff mbox series

[v4] dt-bindings: leds: add 'internet' and 'signal' function definitions

Message ID TYAP286MB0315F4D71698370875F58F6EBCAAA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
State Not Applicable
Headers show
Series [v4] dt-bindings: leds: add 'internet' and 'signal' function definitions | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success

Commit Message

Shiji Yang Nov. 6, 2023, 6:26 a.m. UTC
These two types of LEDs are widely used in routers and NICs.

The 'signal' LED is used to display the wireless signal strength.
Usually, there are 3~4 LEDs in one group to indicate the signal
strength, similar to the signal icon on a mobile phone.

The 'internet' LED can indicate whether the device can access a
specific server. It's different from 'wan'. 'wan' usually indicates
whether the WAN port is connected to the modem (internet services
may still be unavailable). But the 'internet' shows if the device
can successfully ping servers such as 8.8.8.8 to detect the internet
connection status. When the router is running in AP only mode, we
can even connect LAN port to the AC/modem to connect to the internet.
In this case, the 'internet' LED should be on. On some routers, both
'internet' and 'wan' are available and can be controlled separately.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---

Changes in v2:
* Remove the LED name sorting patch as it changes the ABI.
* Add "devicetree@vger.kernel.org" to '--to' list.
  Thanks to Rob Herring and Krzysztof Kozlowski for letting me know I
  can send patch to multiple mailing list at once.

Changes in v3:
* Add more information about the new added LEDs.
* Remove the missing LED fix as Jisheng Zhang has already sent a
  similar one. I should search the mailing list first...

Changes in v4:
* Rename 'rssi' LED to more generic name 'signal'. I forgot to update
  the source file in v3.

v1:
https://lore.kernel.org/all/TYAP286MB0315FE921FF113BF76F7B700BCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

v2:
https://lore.kernel.org/all/TYAP286MB03159A83A77E6FD59F271D9BBCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

v3:
https://lore.kernel.org/all/TYAP286MB0315AE8F62E6AB48E3F9A0DDBCA5A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

 include/dt-bindings/leds/common.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rob Herring Nov. 8, 2023, 4:45 p.m. UTC | #1
On Mon, 06 Nov 2023 14:26:51 +0800, Shiji Yang wrote:
> These two types of LEDs are widely used in routers and NICs.
> 
> The 'signal' LED is used to display the wireless signal strength.
> Usually, there are 3~4 LEDs in one group to indicate the signal
> strength, similar to the signal icon on a mobile phone.
> 
> The 'internet' LED can indicate whether the device can access a
> specific server. It's different from 'wan'. 'wan' usually indicates
> whether the WAN port is connected to the modem (internet services
> may still be unavailable). But the 'internet' shows if the device
> can successfully ping servers such as 8.8.8.8 to detect the internet
> connection status. When the router is running in AP only mode, we
> can even connect LAN port to the AC/modem to connect to the internet.
> In this case, the 'internet' LED should be on. On some routers, both
> 'internet' and 'wan' are available and can be controlled separately.
> 
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
> ---
> 
> Changes in v2:
> * Remove the LED name sorting patch as it changes the ABI.
> * Add "devicetree@vger.kernel.org" to '--to' list.
>   Thanks to Rob Herring and Krzysztof Kozlowski for letting me know I
>   can send patch to multiple mailing list at once.
> 
> Changes in v3:
> * Add more information about the new added LEDs.
> * Remove the missing LED fix as Jisheng Zhang has already sent a
>   similar one. I should search the mailing list first...
> 
> Changes in v4:
> * Rename 'rssi' LED to more generic name 'signal'. I forgot to update
>   the source file in v3.
> 
> v1:
> https://lore.kernel.org/all/TYAP286MB0315FE921FF113BF76F7B700BCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
> v2:
> https://lore.kernel.org/all/TYAP286MB03159A83A77E6FD59F271D9BBCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
> v3:
> https://lore.kernel.org/all/TYAP286MB0315AE8F62E6AB48E3F9A0DDBCA5A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
>  include/dt-bindings/leds/common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Lee Jones Nov. 23, 2023, 11:25 a.m. UTC | #2
Andrew, Florian,

Thoughts?

On Mon, 06 Nov 2023, Shiji Yang wrote:

> These two types of LEDs are widely used in routers and NICs.
> 
> The 'signal' LED is used to display the wireless signal strength.
> Usually, there are 3~4 LEDs in one group to indicate the signal
> strength, similar to the signal icon on a mobile phone.
> 
> The 'internet' LED can indicate whether the device can access a
> specific server. It's different from 'wan'. 'wan' usually indicates
> whether the WAN port is connected to the modem (internet services
> may still be unavailable). But the 'internet' shows if the device
> can successfully ping servers such as 8.8.8.8 to detect the internet
> connection status. When the router is running in AP only mode, we
> can even connect LAN port to the AC/modem to connect to the internet.
> In this case, the 'internet' LED should be on. On some routers, both
> 'internet' and 'wan' are available and can be controlled separately.
> 
> Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
> ---
> 
> Changes in v2:
> * Remove the LED name sorting patch as it changes the ABI.
> * Add "devicetree@vger.kernel.org" to '--to' list.
>   Thanks to Rob Herring and Krzysztof Kozlowski for letting me know I
>   can send patch to multiple mailing list at once.
> 
> Changes in v3:
> * Add more information about the new added LEDs.
> * Remove the missing LED fix as Jisheng Zhang has already sent a
>   similar one. I should search the mailing list first...
> 
> Changes in v4:
> * Rename 'rssi' LED to more generic name 'signal'. I forgot to update
>   the source file in v3.
> 
> v1:
> https://lore.kernel.org/all/TYAP286MB0315FE921FF113BF76F7B700BCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
> v2:
> https://lore.kernel.org/all/TYAP286MB03159A83A77E6FD59F271D9BBCA0A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
> v3:
> https://lore.kernel.org/all/TYAP286MB0315AE8F62E6AB48E3F9A0DDBCA5A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/
> 
>  include/dt-bindings/leds/common.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
> index 9a0d33d02..f831c5dba 100644
> --- a/include/dt-bindings/leds/common.h
> +++ b/include/dt-bindings/leds/common.h
> @@ -88,6 +88,7 @@
>  #define LED_FUNCTION_FLASH "flash"
>  #define LED_FUNCTION_HEARTBEAT "heartbeat"
>  #define LED_FUNCTION_INDICATOR "indicator"
> +#define LED_FUNCTION_INTERNET "internet"
>  #define LED_FUNCTION_LAN "lan"
>  #define LED_FUNCTION_MAIL "mail"
>  #define LED_FUNCTION_MTD "mtd"
> @@ -95,6 +96,7 @@
>  #define LED_FUNCTION_PROGRAMMING "programming"
>  #define LED_FUNCTION_RX "rx"
>  #define LED_FUNCTION_SD "sd"
> +#define LED_FUNCTION_SIGNAL "signal"
>  #define LED_FUNCTION_STANDBY "standby"
>  #define LED_FUNCTION_TORCH "torch"
>  #define LED_FUNCTION_TX "tx"
> -- 
> 2.39.2
>
Andrew Lunn Nov. 23, 2023, 3:45 p.m. UTC | #3
On Thu, Nov 23, 2023 at 11:25:43AM +0000, Lee Jones wrote:
> Andrew, Florian,
> 
> Thoughts?

Hi Lee

Thanks for forwarding this.

> On Mon, 06 Nov 2023, Shiji Yang wrote:
> 
> > These two types of LEDs are widely used in routers and NICs.

I would disagree with this. Routers and NICs are very generic
terms. The Cisco router i have in the broom closet does not have a
signal strength. It does not even have WiFi. It has no concept of
Internet.

I would drop NIC and add more words to narrow routers down to a more
specific class of routers, probably those found in homes, rented from
an ISP, most don't actually do L3 routing, or at best, just NAT.

> > The 'signal' LED is used to display the wireless signal strength.
> > Usually, there are 3~4 LEDs in one group to indicate the signal
> > strength, similar to the signal icon on a mobile phone.

Maybe signal_strength. And is there any reason these cannot be used on
a 5G modem to indicate 'mobile phone' like signal strength? So
`similar to` is wrong, they could actually be used for that.

At least the word wireless is used, not wifi. So its reasonably
generic. Are there other signal strength indicators for other media?
I've not seen powerline modems have such indicators. And with those
SNR is more important than signal strength.

> > The 'internet' LED can indicate whether the device can access a
> > specific server. It's different from 'wan'. 'wan' usually indicates
> > whether the WAN port is connected to the modem (internet services
> > may still be unavailable). But the 'internet' shows if the device
> > can successfully ping servers such as 8.8.8.8 to detect the internet
> > connection status. When the router is running in AP only mode, we
> > can even connect LAN port to the AC/modem to connect to the internet.
> > In this case, the 'internet' LED should be on. On some routers, both
> > 'internet' and 'wan' are available and can be controlled separately.

I suggest some of this text appears in the header, to make their
meaning clear. Also, document what WAN means. But care is needed,
since these are networking wide concepts, not the very narrow market
of an ISP rented boxes.

    Andrew
diff mbox series

Patch

diff --git a/include/dt-bindings/leds/common.h b/include/dt-bindings/leds/common.h
index 9a0d33d02..f831c5dba 100644
--- a/include/dt-bindings/leds/common.h
+++ b/include/dt-bindings/leds/common.h
@@ -88,6 +88,7 @@ 
 #define LED_FUNCTION_FLASH "flash"
 #define LED_FUNCTION_HEARTBEAT "heartbeat"
 #define LED_FUNCTION_INDICATOR "indicator"
+#define LED_FUNCTION_INTERNET "internet"
 #define LED_FUNCTION_LAN "lan"
 #define LED_FUNCTION_MAIL "mail"
 #define LED_FUNCTION_MTD "mtd"
@@ -95,6 +96,7 @@ 
 #define LED_FUNCTION_PROGRAMMING "programming"
 #define LED_FUNCTION_RX "rx"
 #define LED_FUNCTION_SD "sd"
+#define LED_FUNCTION_SIGNAL "signal"
 #define LED_FUNCTION_STANDBY "standby"
 #define LED_FUNCTION_TORCH "torch"
 #define LED_FUNCTION_TX "tx"