diff options
| author | Mirko Parthey <mirko.parthey@web.de> | 2017-02-15 17:31:30 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 00:41:39 -0500 |
| commit | ef9e73be031aa4998617a6e11581904687132e5e (patch) | |
| tree | 1705415ba99c0d9cf50b60cb0c313b7fdfb4f56e /arch/mips | |
| parent | ef674c5eb8da4ecb028a2a670b0bb1eec9eed004 (diff) | |
MIPS: BCM47XX: Fix button inversion for Asus WL-500W
commit bdfdaf1a016ef09cb941f2edad485a713510b8d5 upstream.
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
Patchwork: https://patchwork.linux-mips.org/patch/15295/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips')
| -rw-r--r-- | arch/mips/bcm47xx/buttons.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c index 52caa75bfe4e..e2f50d690624 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 | ||
| 22 | static const struct gpio_keys_button | 28 | static const struct gpio_keys_button |
| @@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = { | |||
| 79 | 85 | ||
| 80 | static const struct gpio_keys_button | 86 | static const struct gpio_keys_button |
| 81 | bcm47xx_buttons_asus_wl500w[] __initconst = { | 87 | bcm47xx_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 | ||
| 86 | static const struct gpio_keys_button | 92 | static const struct gpio_keys_button |
