aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-07-21 19:26:50 +0000
committerJohn Crispin <blogic@openwrt.org>2014-07-21 19:26:50 +0000
commit7912032227f05d2467e01934f792330434ed0e86 (patch)
tree493c64ca8f9e7726a86cc0918cc74346cb5de8a5 /target/linux/ar71xx
parent37541620c042432196cd7193f40bbeaab657a05c (diff)
downloadupstream-7912032227f05d2467e01934f792330434ed0e86.tar.gz
upstream-7912032227f05d2467e01934f792330434ed0e86.tar.bz2
upstream-7912032227f05d2467e01934f792330434ed0e86.zip
ar71xx: Register reset button on UBNT AirGW
The airGateway has a reset button connected to GPIO 12, so we should use it. Signed-off-by: Matthew Reeve <mreeve@tenxnetworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41794 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch17
1 files changed, 16 insertions, 1 deletions
diff --git a/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
index d64007dcf7..0fe62d9558 100644
--- a/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
+++ b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
@@ -12,7 +12,7 @@
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
-@@ -389,3 +391,50 @@ static void __init ubnt_nano_m_xw_setup(
+@@ -389,3 +391,65 @@ static void __init ubnt_nano_m_xw_setup(
MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
ubnt_nano_m_xw_setup);
@@ -27,6 +27,17 @@
+ },
+};
+
++static struct gpio_keys_button airgateway_gpio_keys[] __initdata = {
++ {
++ .desc = "reset",
++ .type = EV_KEY,
++ .code = KEY_RESTART,
++ .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
++ .gpio = 12,
++ .active_low = 1,
++ }
++};
++
+static void __init ubnt_airgateway_setup(void)
+{
+ u32 t;
@@ -49,6 +60,10 @@
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airgateway_gpio_leds),
+ ubnt_airgateway_gpio_leds);
+
++ ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
++ ARRAY_SIZE(airgateway_gpio_keys),
++ airgateway_gpio_keys);
++
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac0, 0);
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
+