lantiq/xrx200: fix WLAN button actions for Fritzbox 3370

The WLAN button actions are reversed, i.e. pressing the button emits a
'released' action, and vice versa.
This can easily be checked by adding
logger -t button_action "$BUTTON $ACTION"
as the second line of /etc/rc.button/rfkill, and using logread to read
the events (assuming the preceding patch has been applied).
Defining the GPIO as ACTIVE_LOW corrects this behavior.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
This commit is contained in:
Dustin Gathmann 2020-05-21 01:22:53 +02:00 committed by Adrian Schmutzler
parent a53bf63756
commit 0ee30adb46
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@
wifi { wifi {
label = "wlan"; label = "wlan";
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>; linux,code = <KEY_RFKILL>;
}; };
}; };

View File

@ -44,7 +44,7 @@
wifi { wifi {
label = "wlan"; label = "wlan";
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>; linux,code = <KEY_RFKILL>;
}; };
}; };