ath79: update DTS for TP-Link WDR3600/WDR4300 v1
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 28 Jul 2019 10:16:51 +0000 (12:16 +0200)
committerDavid Bauer <mail@david-bauer.net>
Tue, 13 Aug 2019 00:11:39 +0000 (02:11 +0200)
This replaces gpio-export by gpio-hogs and switches buttons
to interrupt-driven gpio-keys.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi

index 6be197c0cfdfed3be8d2b8ddb137a89c3b5d0c2f..496cf65e26c76b9235893c6e2af48eca23eb9847 100644 (file)
@@ -59,8 +59,7 @@
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <20>;
+               compatible = "gpio-keys";
 
                reset {
                        linux,code = <KEY_RESTART>;
                        debounce-interval = <60>;
                };
        };
-
-       gpio-export {
-               compatible = "gpio-export";
-
-               gpio_usb1_power {
-                       gpio-export,name = "tp-link:power:usb1";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
-               };
-
-               gpio_usb2_power {
-                       gpio-export,name = "tp-link:power:usb2";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
-               };
-
-               gpio_ext_lna0 {
-                       gpio-export,name = "tp-link:ext:lna0";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
-               };
-
-               gpio_ext_lna1 {
-                       gpio-export,name = "tp-link:ext:lna1";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
-               };
-       };
 };
 
 &ref {
 
 &gpio {
        status = "okay";
+
+       lna0 {
+               gpio-hog;
+               gpios = <18 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:ext:lna0";
+       };
+
+       lna1 {
+               gpio-hog;
+               gpios = <19 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:ext:lna1";
+       };
+
+       usb1_power {
+               gpio-hog;
+               gpios = <22 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:power:usb1";
+       };
+
+       usb2_power {
+               gpio-hog;
+               gpios = <21 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "tp-link:power:usb2";
+       };
 };
 
 &spi {