2017-02-14 21:38:17 +00:00
|
|
|
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
|
2017-02-19 10:48:39 +00:00
|
|
|
@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initc
|
2017-02-14 21:38:17 +00:00
|
|
|
|
|
|
|
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
|