From: Karl Palsson <ka...@remake.is>

Backfire had working gpio buttons on atheros, but it's broken in AA,
presumably due to gpiolib changes  With the following changes hotplug
button events are properly generated again in trunk.  This patch should
also be applied to the AA branch, as it's a regression from Backfire.

Signed-off-by: Karl Palsson <ka...@remake.is>
---
 target/linux/atheros/Makefile                           |  2 +-
 target/linux/atheros/patches-3.8/210-reset_button.patch | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/target/linux/atheros/Makefile b/target/linux/atheros/Makefile
index 6e3e24c..d8a687e 100644
--- a/target/linux/atheros/Makefile
+++ b/target/linux/atheros/Makefile
@@ -15,7 +15,7 @@ LINUX_VERSION:=3.8.6
 
 include $(INCLUDE_DIR)/target.mk
 
-DEFAULT_PACKAGES += wpad-mini kmod-ath5k swconfig
+DEFAULT_PACKAGES += wpad-mini kmod-ath5k swconfig kmod-gpio-button-hotplug
 
 define Target/Description
        Build firmware images for Atheros SoC boards
diff --git a/target/linux/atheros/patches-3.8/210-reset_button.patch 
b/target/linux/atheros/patches-3.8/210-reset_button.patch
index c147190..94b5d96 100644
--- a/target/linux/atheros/patches-3.8/210-reset_button.patch
+++ b/target/linux/atheros/patches-3.8/210-reset_button.patch
@@ -70,3 +70,14 @@
 +}
 +
 +module_init(ar231x_init_reset);
+--- a/arch/mips/ar231x/ar2315.c
++++ b/arch/mips/ar231x/ar2315.c
+@@ -705,8 +705,6 @@ ar2315_plat_setup(void)
+       if (!is_2315())
+               return;
+ 
+-      gpio_request(AR2315_RESET_GPIO, "reset");
+-
+       /* Clear any lingering AHB errors */
+       config = read_c0_config();
+       write_c0_config(config & ~0x3);
-- 
1.7.11.7

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to