aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorMirko Parthey <mirko.parthey@web.de>2017-02-14 22:38:17 +0100
committerRafał Miłecki <rafal@milecki.pl>2017-02-16 00:06:22 +0100
commitd517f043434901452fd19dabc7deefb58179c444 (patch)
treea1abc5a5f88f842f0e3558921c60047c7b03f4e5 /target/linux
parentac3a4e7ae276f499b952b09a21c8025fceb88fac (diff)
downloadupstream-d517f043434901452fd19dabc7deefb58179c444.tar.gz
upstream-d517f043434901452fd19dabc7deefb58179c444.tar.bz2
upstream-d517f043434901452fd19dabc7deefb58179c444.zip
brcm47xx: fix button inversion for Asus WL-500W
The Asus WL-500W buttons are active high, but the software treats them as active low. Fix the inverted logic. Signed-off-by: Mirko Parthey <mirko.parthey@web.de> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm47xx/patches-4.4/130-MIPS-bcm47xx-Fix-button-inversion-for-Asus-WL-500W.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-4.4/130-MIPS-bcm47xx-Fix-button-inversion-for-Asus-WL-500W.patch b/target/linux/brcm47xx/patches-4.4/130-MIPS-bcm47xx-Fix-button-inversion-for-Asus-WL-500W.patch
new file mode 100644
index 0000000000..bae19ffd6f
--- /dev/null
+++ b/target/linux/brcm47xx/patches-4.4/130-MIPS-bcm47xx-Fix-button-inversion-for-Asus-WL-500W.patch
@@ -0,0 +1,38 @@
+From: Mirko Parthey <mirko.parthey@web.de>
+Subject: [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W
+
+The Asus WL-500W buttons are active high,
+but the software treats them as active low.
+Fix the inverted logic.
+
+Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
+---
+ arch/mips/bcm47xx/buttons.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/bcm47xx/buttons.c
++++ b/arch/mips/bcm47xx/buttons.c
+@@ -17,6 +17,12 @@
+ .active_low = 1, \
+ }
+
++#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
++ { \
++ .code = _code, \
++ .gpio = _gpio, \
++ }
++
+ /* Asus */
+
+ static const struct gpio_keys_button
+@@ -85,8 +91,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initc
+
+ static const struct gpio_keys_button
+ bcm47xx_buttons_asus_wl500w[] __initconst = {
+- BCM47XX_GPIO_KEY(6, KEY_RESTART),
+- BCM47XX_GPIO_KEY(7, KEY_WPS_BUTTON),
++ BCM47XX_GPIO_KEY_H(6, KEY_RESTART),
++ BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON),
+ };
+
+ static const struct gpio_keys_button