ramips: correct R6220 button flag
authorDavid Bauer <mail@david-bauer.net>
Sat, 9 Nov 2019 18:10:51 +0000 (19:10 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sat, 9 Nov 2019 18:15:40 +0000 (19:15 +0100)
All buttons on the Netgear R6220 are active-low while they are flagged
as active-high.

The GPIO status reads the following for no buttons pressed:

root@64367-r6220:~# cat /sys/kernel/debug/gpio
gpio-7   (                    |wps                 ) in  hi
gpio-8   (                    |wifi                ) in  hi
gpio-14  (                    |reset               ) in  hi

Signed-off-by: David Bauer <mail@david-bauer.net>
target/linux/ramips/dts/mt7621_netgear_r6220.dts

index 281c0d53319fe1acee0e6fa2295695fad9255dbb..f23e12b8520f72dd16dacf4bb56f533fba36c2ca 100644 (file)
 
                wps {
                        label = "wps";
-                       gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
                wifi {
                        label = "wifi";
-                       gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RFKILL>;
                };
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };