* [PATCH v2 1/2] leds: core: add missing LED color strings [not found] <20231031132901.11732-1-yangshiji66@outlook.com> @ 2023-10-31 13:29 ` Shiji Yang 2023-11-01 11:35 ` Jisheng Zhang 2023-10-31 13:29 ` [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions Shiji Yang 1 sibling, 1 reply; 6+ messages in thread From: Shiji Yang @ 2023-10-31 13:29 UTC (permalink / raw) To: devicetree, linux-leds Cc: linux-kernel, Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Olliver Schinagl, Shiji Yang Some new monochromatic LEDs have been introduced into DT bindings, but they do not have corresponding descriptions on the led_colors structure. This patch adds the missing LED color strings. Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") Signed-off-by: Shiji Yang <yangshiji66@outlook.com> --- drivers/leds/led-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index 214ed81eb..223023928 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { [LED_COLOR_ID_IR] = "ir", [LED_COLOR_ID_MULTI] = "multicolor", [LED_COLOR_ID_RGB] = "rgb", + [LED_COLOR_ID_PURPLE] = "purple", + [LED_COLOR_ID_ORANGE] = "orange", + [LED_COLOR_ID_PINK] = "pink", + [LED_COLOR_ID_CYAN] = "cyan", + [LED_COLOR_ID_LIME] = "lime", }; EXPORT_SYMBOL_GPL(led_colors); -- 2.39.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] leds: core: add missing LED color strings 2023-10-31 13:29 ` [PATCH v2 1/2] leds: core: add missing LED color strings Shiji Yang @ 2023-11-01 11:35 ` Jisheng Zhang 0 siblings, 0 replies; 6+ messages in thread From: Jisheng Zhang @ 2023-11-01 11:35 UTC (permalink / raw) To: Shiji Yang Cc: devicetree, linux-leds, linux-kernel, Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Olliver Schinagl On Tue, Oct 31, 2023 at 09:29:00PM +0800, Shiji Yang wrote: > Some new monochromatic LEDs have been introduced into DT bindings, > but they do not have corresponding descriptions on the led_colors > structure. This patch adds the missing LED color strings. > > Fixes: 472d7b9e8141 ("dt-bindings: leds: Expand LED_COLOR_ID definitions") > Signed-off-by: Shiji Yang <yangshiji66@outlook.com> > --- > drivers/leds/led-core.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c > index 214ed81eb..223023928 100644 > --- a/drivers/leds/led-core.c > +++ b/drivers/leds/led-core.c > @@ -36,6 +36,11 @@ const char * const led_colors[LED_COLOR_ID_MAX] = { > [LED_COLOR_ID_IR] = "ir", > [LED_COLOR_ID_MULTI] = "multicolor", > [LED_COLOR_ID_RGB] = "rgb", > + [LED_COLOR_ID_PURPLE] = "purple", > + [LED_COLOR_ID_ORANGE] = "orange", > + [LED_COLOR_ID_PINK] = "pink", > + [LED_COLOR_ID_CYAN] = "cyan", > + [LED_COLOR_ID_LIME] = "lime", A similar patch was sent out two days ago, earlier than yours ;) https://lore.kernel.org/linux-leds/20231030054757.3476-1-jszhang@kernel.org/ > }; > EXPORT_SYMBOL_GPL(led_colors); > > -- > 2.39.2 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions [not found] <20231031132901.11732-1-yangshiji66@outlook.com> 2023-10-31 13:29 ` [PATCH v2 1/2] leds: core: add missing LED color strings Shiji Yang @ 2023-10-31 13:29 ` Shiji Yang 2023-10-31 18:03 ` Rob Herring 1 sibling, 1 reply; 6+ messages in thread From: Shiji Yang @ 2023-10-31 13:29 UTC (permalink / raw) To: devicetree, linux-leds Cc: linux-kernel, Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Olliver Schinagl, Shiji Yang These two types of LEDs are widely used in routers and NICs. The RSSI (Received Signal Strength Indicator) LED is used to display the Wi-Fi signal strength, and the Internet LED can indicate whether the device can access a specific server. Signed-off-by: Shiji Yang <yangshiji66@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..55a426e39 100644 --- a/include/dt-bindings/leds/common.h +++ b/include/dt-bindings/leds/common.h @@ -88,11 +88,13 @@ #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" #define LED_FUNCTION_PANIC "panic" #define LED_FUNCTION_PROGRAMMING "programming" +#define LED_FUNCTION_RSSI "rssi" #define LED_FUNCTION_RX "rx" #define LED_FUNCTION_SD "sd" #define LED_FUNCTION_STANDBY "standby" -- 2.39.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions 2023-10-31 13:29 ` [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions Shiji Yang @ 2023-10-31 18:03 ` Rob Herring 2023-11-01 1:47 ` Shiji Yang 0 siblings, 1 reply; 6+ messages in thread From: Rob Herring @ 2023-10-31 18:03 UTC (permalink / raw) To: Shiji Yang Cc: devicetree, linux-leds, linux-kernel, Pavel Machek, Lee Jones, Krzysztof Kozlowski, Conor Dooley, Olliver Schinagl On Tue, Oct 31, 2023 at 09:29:01PM +0800, Shiji Yang wrote: > These two types of LEDs are widely used in routers and NICs. The > RSSI (Received Signal Strength Indicator) LED is used to display > the Wi-Fi signal strength, and the Internet LED can indicate > whether the device can access a specific server. > > Signed-off-by: Shiji Yang <yangshiji66@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..55a426e39 100644 > --- a/include/dt-bindings/leds/common.h > +++ b/include/dt-bindings/leds/common.h > @@ -88,11 +88,13 @@ > #define LED_FUNCTION_FLASH "flash" > #define LED_FUNCTION_HEARTBEAT "heartbeat" > #define LED_FUNCTION_INDICATOR "indicator" > +#define LED_FUNCTION_INTERNET "internet" Duplicate of 'wan'. > #define LED_FUNCTION_LAN "lan" > #define LED_FUNCTION_MAIL "mail" > #define LED_FUNCTION_MTD "mtd" > #define LED_FUNCTION_PANIC "panic" > #define LED_FUNCTION_PROGRAMMING "programming" > +#define LED_FUNCTION_RSSI "rssi" 'rx' or 'wlan'? Wouldn't you need multiple LEDs to indicate signal strength? Maybe 'signal' or something would be more generic? > #define LED_FUNCTION_RX "rx" > #define LED_FUNCTION_SD "sd" > #define LED_FUNCTION_STANDBY "standby" > -- > 2.39.2 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions 2023-10-31 18:03 ` Rob Herring @ 2023-11-01 1:47 ` Shiji Yang 2023-11-01 14:49 ` Rob Herring 0 siblings, 1 reply; 6+ messages in thread From: Shiji Yang @ 2023-11-01 1:47 UTC (permalink / raw) To: robh Cc: conor+dt, devicetree, krzysztof.kozlowski+dt, lee, linux-kernel, linux-leds, oliver, pavel On Tue, 31 Oct 2023 13:03:05 -0500, Rob Herring wrote: >On Tue, Oct 31, 2023 at 09:29:01PM +0800, Shiji Yang wrote: >> These two types of LEDs are widely used in routers and NICs. The >> RSSI (Received Signal Strength Indicator) LED is used to display >> the Wi-Fi signal strength, and the Internet LED can indicate >> whether the device can access a specific server. >> >> Signed-off-by: Shiji Yang <yangshiji66@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..55a426e39 100644 >> --- a/include/dt-bindings/leds/common.h >> +++ b/include/dt-bindings/leds/common.h >> @@ -88,11 +88,13 @@ >> #define LED_FUNCTION_FLASH "flash" >> #define LED_FUNCTION_HEARTBEAT "heartbeat" >> #define LED_FUNCTION_INDICATOR "indicator" >> +#define LED_FUNCTION_INTERNET "internet" > >Duplicate of 'wan'. It's different from 'wan'. 'wan' usually indicates whether the WAN port is connected to the modem (internet services may still unavailable). But the 'internet' shows if the device can successfully ping servers like 8.8.8.8 to detected the internet connection status. When the router operates in AP only mode, we can even connect LAN port to the AC/modem to connect to the internet. In this case, 'internet' LED should still be on. On some routers, both 'internet' and 'wan' are available and be controled separately. Ref: OpenWrt has a lot of devices that require the 'internet' LED: https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=grep&s=label+%3D+.*net&sr=1 Anyway, if it is still unacceptable, please let me know and I will remove it in v3. > >> #define LED_FUNCTION_LAN "lan" >> #define LED_FUNCTION_MAIL "mail" >> #define LED_FUNCTION_MTD "mtd" >> #define LED_FUNCTION_PANIC "panic" >> #define LED_FUNCTION_PROGRAMMING "programming" >> +#define LED_FUNCTION_RSSI "rssi" > >'rx' or 'wlan'? 'rx' and 'wlan' only shows the data transfer speed and on/off status, this one indicates the signal strength. > >Wouldn't you need multiple LEDs to indicate signal strength? Maybe >'signal' or something would be more generic? Yes, usually there are 3~4 LEDs to indicate the signal strength, just like the signal icon on the mobile phone. We can use `function-enumerator` led property to mark the different leds in the signal group. I'll rename it to 'signal' in v3. > >> #define LED_FUNCTION_RX "rx" >> #define LED_FUNCTION_SD "sd" >> #define LED_FUNCTION_STANDBY "standby" >> -- >> 2.39.2 >> Regards, Shiji Yang ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions 2023-11-01 1:47 ` Shiji Yang @ 2023-11-01 14:49 ` Rob Herring 0 siblings, 0 replies; 6+ messages in thread From: Rob Herring @ 2023-11-01 14:49 UTC (permalink / raw) To: Shiji Yang Cc: conor+dt, devicetree, krzysztof.kozlowski+dt, lee, linux-kernel, linux-leds, oliver, pavel On Tue, Oct 31, 2023 at 8:47 PM Shiji Yang <yangshiji66@outlook.com> wrote: > > On Tue, 31 Oct 2023 13:03:05 -0500, Rob Herring wrote: > > >On Tue, Oct 31, 2023 at 09:29:01PM +0800, Shiji Yang wrote: > >> These two types of LEDs are widely used in routers and NICs. The > >> RSSI (Received Signal Strength Indicator) LED is used to display > >> the Wi-Fi signal strength, and the Internet LED can indicate > >> whether the device can access a specific server. > >> > >> Signed-off-by: Shiji Yang <yangshiji66@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..55a426e39 100644 > >> --- a/include/dt-bindings/leds/common.h > >> +++ b/include/dt-bindings/leds/common.h > >> @@ -88,11 +88,13 @@ > >> #define LED_FUNCTION_FLASH "flash" > >> #define LED_FUNCTION_HEARTBEAT "heartbeat" > >> #define LED_FUNCTION_INDICATOR "indicator" > >> +#define LED_FUNCTION_INTERNET "internet" > > > >Duplicate of 'wan'. > > > It's different from 'wan'. 'wan' usually indicates whether the WAN > port is connected to the modem (internet services may still > unavailable). But the 'internet' shows if the device can successfully > ping servers like 8.8.8.8 to detected the internet connection status. > When the router operates in AP only mode, we can even connect LAN port > to the AC/modem to connect to the internet. In this case, 'internet' > LED should still be on. On some routers, both 'internet' and 'wan' > are available and be controled separately. > > Ref: OpenWrt has a lot of devices that require the 'internet' LED: > https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=grep&s=label+%3D+.*net&sr=1 Okay, please include all this information in the commit msg. Rob ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-01 14:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231031132901.11732-1-yangshiji66@outlook.com>
2023-10-31 13:29 ` [PATCH v2 1/2] leds: core: add missing LED color strings Shiji Yang
2023-11-01 11:35 ` Jisheng Zhang
2023-10-31 13:29 ` [PATCH v2 2/2] dt-bindings: leds: add "internet" and "rssi" function definitions Shiji Yang
2023-10-31 18:03 ` Rob Herring
2023-11-01 1:47 ` Shiji Yang
2023-11-01 14:49 ` Rob Herring
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).