aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-14 13:01:39 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-21 12:36:16 +0100
commitf6f916b3e5bfc8cb6d399bac5af5ed36ab1ad441 (patch)
tree080687f0fd6cc01215d924b0268a5bef1aa0f8a1 /target/linux
parent0e85ace8409b52cb1510f04ce337205d7abff0bd (diff)
downloadupstream-f6f916b3e5bfc8cb6d399bac5af5ed36ab1ad441.tar.gz
upstream-f6f916b3e5bfc8cb6d399bac5af5ed36ab1ad441.tar.bz2
upstream-f6f916b3e5bfc8cb6d399bac5af5ed36ab1ad441.zip
ar71xx: fix buttons for TP-Link TL-WDR4900 v2
TP-Link TL-WDR4900 v2 only has one combined WPS/Reset button, so don't set up an RFKILL for this device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 25127f58b42d794bd47d56ea107f3dfc9cc4816c)
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c
index b5de1ccc1d..f19ba7a8e6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c7.c
@@ -169,6 +169,17 @@ static struct gpio_keys_button archer_c7_v2_gpio_keys[] __initdata = {
},
};
+static struct gpio_keys_button wdr4900_gpio_keys[] __initdata = {
+ {
+ .desc = "Reset button",
+ .type = EV_KEY,
+ .code = KEY_WPS_BUTTON,
+ .debounce_interval = ARCHER_C7_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = ARCHER_C7_GPIO_BTN_RESET,
+ .active_low = 1,
+ },
+};
+
static const struct ar8327_led_info archer_c7_leds_ar8327[] = {
AR8327_LED_INFO(PHY0_0, HW, "tp-link:blue:wan"),
AR8327_LED_INFO(PHY1_0, HW, "tp-link:blue:lan1"),
@@ -326,8 +337,8 @@ MIPS_MACHINE(ATH79_MACH_ARCHER_C7_V2, "ARCHER-C7-V2", "TP-LINK Archer C7",
static void __init tl_wdr4900_v2_setup(void)
{
ath79_register_gpio_keys_polled(-1, ARCHER_C7_KEYS_POLL_INTERVAL,
- ARRAY_SIZE(archer_c7_gpio_keys),
- archer_c7_gpio_keys);
+ ARRAY_SIZE(wdr4900_gpio_keys),
+ wdr4900_gpio_keys);
ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr4900_leds_gpio),
wdr4900_leds_gpio);
common_setup(false);