浏览代码

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 <[email protected]>
David Bauer 5 年之前
父节点
当前提交
b017a016cc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr3020.c

+ 2 - 2
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",
 		.desc		= "sw1",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_0,
 		.code		= BTN_0,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_MR3020_GPIO_BTN_SW1,
 		.gpio		= TL_MR3020_GPIO_BTN_SW1,
@@ -87,7 +87,7 @@ static struct gpio_keys_button tl_mr3020_gpio_keys[] __initdata = {
 	},
 	},
 	{
 	{
 		.desc		= "sw2",
 		.desc		= "sw2",
-		.type		= EV_KEY,
+		.type		= EV_SW,
 		.code		= BTN_1,
 		.code		= BTN_1,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.debounce_interval = TL_MR3020_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= TL_MR3020_GPIO_BTN_SW2,
 		.gpio		= TL_MR3020_GPIO_BTN_SW2,