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>
This commit is contained in:
Christian Marangi 2024-02-07 14:48:36 +01:00
parent 4a8928526e
commit 0a4cc0a9ba
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
21 changed files with 168 additions and 63 deletions

View File

@ -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 {

View File

@ -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>;
};
};

View File

@ -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 {

View File

@ -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>;
};
};

View File

@ -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;
};
};

View File

@ -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 {

View File

@ -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>;
};
};

View File

@ -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 {

View File

@ -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>;
};
};

View File

@ -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>;
};
};

View File

@ -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 {

View File

@ -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";
};

View File

@ -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>;
};
};

View File

@ -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 {

View File

@ -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>;
};
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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>;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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>;
};
};