ar71xx: fix ZyXEL NBG6616 wifi switch
authorChristoph Krapp <achterin@googlemail.com>
Mon, 10 Aug 2020 19:22:26 +0000 (21:22 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 10 Aug 2020 23:18:04 +0000 (01:18 +0200)
The device uses a rf-kill switch instead of a button. Furthermore the
GPIO is active high.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
(cherry picked from commit 0af656e978f1adac4061516d9d2e661e101ba64c)

target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c

index c28a8a511875a51a3bac1914f8ec39007e4e4311..f317cf759e6937fd1fa9b37537abcaf95fa522a8 100644 (file)
@@ -198,11 +198,11 @@ static struct gpio_keys_button nbg6616_gpio_keys[] __initdata = {
        },
        {
                .desc           = "RFKILL button",
        },
        {
                .desc           = "RFKILL button",
-               .type           = EV_KEY,
+               .type           = EV_SW,
                .code           = KEY_RFKILL,
                .debounce_interval = NBG6716_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = NBG6716_GPIO_BTN_RFKILL,
                .code           = KEY_RFKILL,
                .debounce_interval = NBG6716_KEYS_DEBOUNCE_INTERVAL,
                .gpio           = NBG6716_GPIO_BTN_RFKILL,
-               .active_low     = 1,
+               .active_low     = 0,
        },
        {
                .desc           = "WPS button",
        },
        {
                .desc           = "WPS button",