aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2020-05-30 16:24:03 +0200
committerDavid Bauer <mail@david-bauer.net>2020-05-31 15:54:52 +0200
commit9cafcbe0bdd601d07ed55bee0136f5d8393c37a8 (patch)
tree73dab0696e96e5f0121b1c188cd34fadddd96ba7 /target/linux/ar71xx
parent2bd1cf92e97f2b4b9e8ae87d2c662d92f7791ab4 (diff)
downloadupstream-9cafcbe0bdd601d07ed55bee0136f5d8393c37a8.tar.gz
upstream-9cafcbe0bdd601d07ed55bee0136f5d8393c37a8.tar.bz2
upstream-9cafcbe0bdd601d07ed55bee0136f5d8393c37a8.zip
ar71xx: correct button type for TL-MR3020 mode slider
The TP-Link TL-MR3020 has a three-state mode slider which was previously integrated as a button (EV_KEY). This led to spurious activations of failsafe mode. Set the type for the button to switch (EV_SW), to avoid unintended activations of failsafe mode. Related: commit 27f3f493de06 ("gpio-button-hotplug: unify polled and interrupt code") Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit b017a016cc0cd26f84a7e6b8de3dc02dc101e888)
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
index 0a9dfbc8a0..e3b4087eff 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c
@@ -79,7 +79,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
},
{
.desc = "sw1",
- .type = EV_KEY,
+ .type = EV_SW,
.code = BTN_0,
.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_MR3020_GPIO_BTN_SW1,
@@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
},
{
.desc = "sw2",
- .type = EV_KEY,
+ .type = EV_SW,
.code = BTN_1,
.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_MR3020_GPIO_BTN_SW2,