diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2024-02-07 14:48:36 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2024-02-07 14:48:36 +0100 |
commit | 0a4cc0a9ba82dd7c7ffabc750bb2ba9e349bb116 (patch) | |
tree | f2cd454022dacaac09689d0f5a30c4de1d05315a /target/linux/bmips | |
parent | 4a8928526e0b27eaedee49b6d8bc3a4844cca996 (diff) | |
download | openwrt-0a4cc0a9ba82dd7c7ffabc750bb2ba9e349bb116.tar.gz openwrt-0a4cc0a9ba82dd7c7ffabc750bb2ba9e349bb116.tar.bz2 openwrt-0a4cc0a9ba82dd7c7ffabc750bb2ba9e349bb116.zip |
bmips: convert to new LED color/function format where possible
Initial conversion to new LED color/function format
and drop label format where possible. The same label
is composed at runtime.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/bmips')
21 files changed, 168 insertions, 63 deletions
diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi index a389187d8d..66c64d990b 100644 --- a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi +++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm63268.dtsi" / { @@ -59,7 +61,8 @@ led_power_red: led@8 { reg = <8>; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; @@ -95,7 +98,8 @@ led_power_green: led@17 { reg = <17>; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led@23 { diff --git a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts index 3f830f058e..fed4428405 100644 --- a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts +++ b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm63268.dtsi" / { @@ -83,13 +85,15 @@ led@4 { reg = <4>; active-low; - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; }; led@7 { reg = <7>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led@8 { @@ -143,7 +147,8 @@ led_power_green: led@20 { reg = <20>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; }; diff --git a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts index 3c79d38bfb..cdfd58e609 100644 --- a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts +++ b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm63268.dtsi" / { @@ -109,7 +111,8 @@ led_power_red: led@8 { reg = <8>; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; }; led@9 { diff --git a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts index b0576748d3..375b01b673 100644 --- a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts +++ b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm63268.dtsi" / { @@ -121,20 +123,23 @@ led_power_red: led@3 { reg = <3>; active-low; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; led_power_green: led@6 { reg = <6>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led@7 { reg = <7>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led@8 { @@ -158,7 +163,8 @@ led@14 { reg = <14>; active-low; - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_RED>; }; }; diff --git a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts index 052f61002b..c3c9a9bdf4 100644 --- a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts +++ b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6318.dtsi" / { @@ -128,19 +130,22 @@ led@0 { reg = <0>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led_power_green: led@1 { reg = <1>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led@2 { reg = <2>; active-low; - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; }; led@4 { @@ -192,7 +197,8 @@ led_power_red: led@11 { reg = <11>; active-low; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; }; diff --git a/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts b/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts index 649c595848..755312974d 100644 --- a/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts +++ b/target/linux/bmips/dts/bcm6328-arcadyan-ar7516.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -117,7 +119,8 @@ led@6 { reg = <6>; active-low; - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_GREEN>; }; led@7 { diff --git a/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts b/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts index 09e6f99389..d5a3452e79 100644 --- a/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts +++ b/target/linux/bmips/dts/bcm6328-comtrend-ar-5381u.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -114,7 +116,8 @@ led_alarm_red: led@2 { reg = <2>; active-low; - label = "red:alarm"; + function = LED_FUNCTION_ALARM; + color = <LED_COLOR_ID_RED>; panic-indicator; }; @@ -127,7 +130,8 @@ led_power_green: led@4 { reg = <4>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; }; diff --git a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts index 7ee87c636e..402e54e5df 100644 --- a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts +++ b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -136,7 +138,8 @@ led_power_red: led@4 { reg = <4>; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; @@ -147,7 +150,8 @@ led_power_green: led@8 { reg = <8>; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led@11 { diff --git a/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts b/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts index f2f70fcb17..68f10d46a5 100644 --- a/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts +++ b/target/linux/bmips/dts/bcm6328-innacomm-w3400v6.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -129,21 +131,24 @@ led_power_green: led@4 { reg = <4>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; default-state = "on"; }; led_power_red: led@5 { reg = <5>; active-low; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; led@11 { reg = <11>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; }; diff --git a/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts b/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts index d096a1a42c..8890477f32 100644 --- a/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts +++ b/target/linux/bmips/dts/bcm6328-nucom-r5010unv2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -132,26 +134,30 @@ led_power_green: led@4 { reg = <4>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led_power_red: led@5 { reg = <5>; active-low; - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; panic-indicator; }; led@10 { reg = <10>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led@11 { reg = <11>; active-low; - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; }; }; diff --git a/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts b/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts index 438f1d5fec..03a58a6fde 100644 --- a/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts +++ b/target/linux/bmips/dts/bcm6328-sercomm-ad1018.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6328.dtsi" / { @@ -107,7 +109,8 @@ led_power_green: led@8 { reg = <8>; active-low; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; default-state = "on"; }; @@ -132,7 +135,8 @@ led@13 { reg = <13>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led@14 { @@ -144,7 +148,8 @@ led@15 { reg = <15>; active-low; - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; }; led@17 { diff --git a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts index c2693fa716..554ef1993e 100644 --- a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts +++ b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6358.dtsi" / { @@ -65,7 +67,8 @@ }; led_power_red: led@3 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; @@ -120,7 +123,8 @@ compatible = "gpio-leds"; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = <LED_COLOR_ID_RED>; gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts index 32682b2610..38dcec3e9b 100644 --- a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts +++ b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6362.dtsi" / { @@ -47,7 +49,8 @@ }; led@30 { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 30 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts index f7182b78da..94e9aa3d21 100644 --- a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts +++ b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6362.dtsi" / { @@ -48,7 +50,8 @@ }; led_power_red: led@34 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 34 GPIO_ACTIVE_LOW>; panic-indicator; }; @@ -85,13 +88,15 @@ led_power_green: led@8 { reg = <8>; - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; }; led@9 { reg = <9>; active-low; - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; }; led@10 { diff --git a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts index fec67d0db9..8dc37d492f 100644 --- a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts +++ b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -36,38 +38,45 @@ compatible = "gpio-leds"; led@5 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led@21 { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; led_power_green: led@22 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led@23 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; led_power_red: led@24 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; panic-indicator; }; led@30 { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 30 GPIO_ACTIVE_LOW>; }; led@31 { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 31 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts index 63a07fe70e..e0bac82ff8 100644 --- a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts +++ b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -39,12 +41,14 @@ }; led_power_green: led@22 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led_power_red: led@24 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts index 937fbdd1a1..a0beba2c0c 100644 --- a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts +++ b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -39,12 +41,14 @@ }; led_power_green: led@22 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led_power_red: led@24 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi index c647559d6c..49c546692a 100644 --- a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi +++ b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -45,17 +47,20 @@ }; led@4 { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led@5 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; led@11 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -72,18 +77,21 @@ }; led_power_red: led@22 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; panic-indicator; }; led@23 { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; led_power_green: led@24 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts index 0f74c4b902..f9fefaccb8 100644 --- a/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts +++ b/target/linux/bmips/dts/bcm6368-observa-vh4032n.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -56,12 +58,14 @@ }; led_power_blue: led@22 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_BLUE>; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led_power_red: led@24 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts index 70572b49a9..1b8b155f26 100644 --- a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts +++ b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -48,22 +50,26 @@ }; led@14 { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: led@22 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led@23 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; led_power_red: led@24 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts index 00017238c8..cf19bb33f4 100644 --- a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts +++ b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include <dt-bindings/leds/common.h> + #include "bcm6368.dtsi" / { @@ -56,28 +58,33 @@ }; led@15 { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_power_green: led@22 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; led_power_red: led@23 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = <LED_COLOR_ID_RED>; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; panic-indicator; }; led@24 { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; led@27 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_GREEN>; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; }; |