[OpenWrt-Devel] [PATCH 05/11] ar71xx: set all buttons to be active_low on wnr2000-v4

Michael J. Bazzinotti bazz at cs.umb.edu
Mon Apr 20 19:24:16 EDT 2015


From: "Michael J. Bazzinotti" <mbazzinotti at gmail.com>

Originally pressing a button would trigger a release state and vice-versa,
as observed from hotplug.d.

Signed-off-by: Michael J. Bazzinotti <mbazzinotti at gmail.com>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c
index df0bf0e..cc478e6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c
@@ -102,6 +102,7 @@ static struct gpio_keys_button wnr2000v4_gpio_keys[] __initdata = {
 		.code		= KEY_WPS_BUTTON,
 		.debounce_interval = WNR2000V4_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= WNR2000V4_GPIO_BTN_WPS,
+		.active_low	= 1,
 	},
 	{
 		.desc		= "Reset button",
@@ -109,6 +110,7 @@ static struct gpio_keys_button wnr2000v4_gpio_keys[] __initdata = {
 		.code		= KEY_RESTART,
 		.debounce_interval = WNR2000V4_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= WNR2000V4_GPIO_BTN_RESET,
+		.active_low	= 1,
 	},
 	{
 		.desc		= "WLAN button",
@@ -116,6 +118,7 @@ static struct gpio_keys_button wnr2000v4_gpio_keys[] __initdata = {
 		.code		= KEY_WLAN,
 		.debounce_interval = WNR2000V4_KEYS_DEBOUNCE_INTERVAL,
 		.gpio		= WNR2000V4_GPIO_BTN_WLAN,
+		.active_low	= 1,
 	},
 };
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list