[OpenWrt-Devel] lantiq: Fix gpio-leds for P2812HNUF1 and TDW8980

Message ID 1546170001-10607-1-git-send-email-ynezz@true.cz
State Not Applicable, archived
Headers show
Series
  • [OpenWrt-Devel] lantiq: Fix gpio-leds for P2812HNUF1 and TDW8980
Related show

Commit Message

Petr Štetiar Dec. 30, 2018, 11:40 a.m.
While at it rename node name to the generic `leds`.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts | 3 ++-
 target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Christian Lamparter Jan. 18, 2019, 7:50 p.m. | #1
On Sunday, December 30, 2018 12:40:01 PM CET Petr Štetiar wrote:
> While at it rename node name to the generic `leds`.
> 
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
>  target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts | 3 ++-
>  target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts    | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
> index 911a2d6..7626a54 100644
> --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
> +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
> @@ -11,7 +11,8 @@
>  		led-usb2 = &led_usb2;
>  	};
>  
> -	gpio-leds {
> +	leds {
> +		compatible = "gpio-leds";

I think what happens here is that "P2812HNUF1.dts" includes P2812HNUFX.dtsi
which has:
|		gpio-leds {
|			compatible = "gpio-leds";

<https://github.com/openwrt/openwrt/blob/master/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUFX.dtsi#L48>


>  		led_usb1: usb1 {
>  			label = "p2812hnuf1:green:usb1";
>  			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
> diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
> index 76875e7..6d686a8 100644
> --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
> +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
> @@ -6,7 +6,8 @@
>  	compatible = "tplink,tdw8980", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
>  	model = "TP-LINK TD-W8980";
>  
> -	gpio-leds {
> +	leds {
> +		compatible = "gpio-leds";
>  		wifi2 {
>  			label = "tdw8980:green:wlan5ghz";
>  			gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
> 
Same as above. The compatible is inherited from "TDW89X0.dtsi".

Patch

diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
index 911a2d6..7626a54 100644
--- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
+++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/P2812HNUF1.dts
@@ -11,7 +11,8 @@ 
 		led-usb2 = &led_usb2;
 	};
 
-	gpio-leds {
+	leds {
+		compatible = "gpio-leds";
 		led_usb1: usb1 {
 			label = "p2812hnuf1:green:usb1";
 			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
index 76875e7..6d686a8 100644
--- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
+++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/TDW8980.dts
@@ -6,7 +6,8 @@ 
 	compatible = "tplink,tdw8980", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
 	model = "TP-LINK TD-W8980";
 
-	gpio-leds {
+	leds {
+		compatible = "gpio-leds";
 		wifi2 {
 			label = "tdw8980:green:wlan5ghz";
 			gpios = <&gpio 24 GPIO_ACTIVE_LOW>;