diff mbox series

[3/8] arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board meson-khadas-vim3

Message ID 20200925033017.1790973-4-art@khadas.com (mailing list archive)
State New, archived
Headers show
Series dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards | expand

Commit Message

Artem Lapkin Sept. 25, 2020, 3:30 a.m. UTC
add aliases names led_white and led_red for white and red leds

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Neil Armstrong Sept. 25, 2020, 7:39 a.m. UTC | #1
Hi,

On 25/09/2020 05:30, Artem Lapkin wrote:
> add aliases names led_white and led_red for white and red leds

Sorry, can you explain why you need these ? They should not be used by the led framework.

> 
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> index 73783692e30..7e137399257 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> @@ -12,6 +12,8 @@ / {
>  	aliases {
>  		serial0 = &uart_AO;
>  		ethernet0 = &ethmac;
> +		led_red = &led_red;
> +		led_white = &led_white;

These aliases are not standard aliases.

>  	};
>  
>  	chosen {
> @@ -39,13 +41,13 @@ button-function {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		led-white {
> +		led_white: led-white {
>  			label = "vim3:white:sys";
>  			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
>  			linux,default-trigger = "heartbeat";
>  		};
>  
> -		led-red {
> +		led_red: led-red {
>  			label = "vim3:red";
>  			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
>  		};
> 

Instead you should convert these to the new function/color attributes are described in:
Documentation/devicetree/bindings/leds/common.yaml

{
	function = LED_FUNCTION_STATUS;
	color = <LED_COLOR_ID_WHITE>;
}

Neil
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
index 73783692e30..7e137399257 100644
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
@@ -12,6 +12,8 @@  / {
 	aliases {
 		serial0 = &uart_AO;
 		ethernet0 = &ethmac;
+		led_red = &led_red;
+		led_white = &led_white;
 	};
 
 	chosen {
@@ -39,13 +41,13 @@  button-function {
 	leds {
 		compatible = "gpio-leds";
 
-		led-white {
+		led_white: led-white {
 			label = "vim3:white:sys";
 			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		led-red {
+		led_red: led-red {
 			label = "vim3:red";
 			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
 		};