aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMirko Parthey <mirko.parthey@web.de>2017-02-15 17:31:30 -0500
committerJames Hogan <james.hogan@imgtec.com>2017-02-17 06:16:46 -0500
commitbdfdaf1a016ef09cb941f2edad485a713510b8d5 (patch)
treeb1e607c4351b7fcab5bc94b2aa38b40f63a83a7c
parent650a2b29cd4aeff6e4d27d823c5f0dcea6566c8b (diff)
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. Fixes: 3be972556fa1 ("MIPS: BCM47XX: Import buttons database from OpenWrt") Signed-off-by: Mirko Parthey <mirko.parthey@web.de> Acked-by: Rafał Miłecki <rafal@milecki.pl> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 3.14.x- Patchwork: https://patchwork.linux-mips.org/patch/15295/ Signed-off-by: James Hogan <james.hogan@imgtec.com>
-rw-r--r--arch/mips/bcm47xx/buttons.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c
index 7d582275908c..8a760d801895 100644
--- a/arch/mips/bcm47xx/buttons.c
+++ b/arch/mips/bcm47xx/buttons.c
@@ -17,6 +17,12 @@
17 .active_low = 1, \ 17 .active_low = 1, \
18 } 18 }
19 19
20#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
21 { \
22 .code = _code, \
23 .gpio = _gpio, \
24 }
25
20/* Asus */ 26/* Asus */
21 27
22static const struct gpio_keys_button 28static const struct gpio_keys_button
@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = {
79 85
80static const struct gpio_keys_button 86static const struct gpio_keys_button
81bcm47xx_buttons_asus_wl500w[] __initconst = { 87bcm47xx_buttons_asus_wl500w[] __initconst = {
82 BCM47XX_GPIO_KEY(6, KEY_RESTART), 88 BCM47XX_GPIO_KEY_H(6, KEY_RESTART),
83 BCM47XX_GPIO_KEY(7, KEY_WPS_BUTTON), 89 BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON),
84}; 90};
85 91
86static const struct gpio_keys_button 92static const struct gpio_keys_button