mpc85xx: 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:40 +01:00
parent c9499decc4
commit 4589fa38c5
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
3 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later or MIT // SPDX-License-Identifier: GPL-2.0-or-later or MIT
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
/include/ "fsl/p1010si-pre.dtsi" /include/ "fsl/p1010si-pre.dtsi"
@ -36,7 +37,8 @@
status_red { status_red {
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
label = "red:status"; function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
}; };
led_mode: mode_green { led_mode: mode_green {

View File

@ -2,6 +2,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/include/ "fsl/p1010si-pre.dtsi" /include/ "fsl/p1010si-pre.dtsi"
@ -42,12 +43,14 @@
led_power_green: power_green { led_power_green: power_green {
gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>; gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>;
label = "green:power"; function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
}; };
led_power_red: power_red { led_power_red: power_red {
gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>; gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>;
label = "red:power"; function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
}; };
lan1_red { lan1_red {

View File

@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ { / {
model = "Extreme Networks WS-AP3825i"; model = "Extreme Networks WS-AP3825i";
@ -47,12 +48,14 @@
led_power_green: power_green { led_power_green: power_green {
gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>; gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>;
label = "green:power"; function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
}; };
led_power_red: power_red { led_power_red: power_red {
gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>; gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>;
label = "red:power"; function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
}; };
lan1_red { lan1_red {