Commit bdfdaf1a authored by Mirko Parthey's avatar Mirko Parthey Committed by James Hogan

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: 3be97255 ("MIPS: BCM47XX: Import buttons database from OpenWrt")
Signed-off-by: default avatarMirko Parthey <mirko.parthey@web.de>
Acked-by: default avatarRafał 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: default avatarJames Hogan <james.hogan@imgtec.com>
parent 650a2b29
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
.active_low = 1, \ .active_low = 1, \
} }
#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
{ \
.code = _code, \
.gpio = _gpio, \
}
/* Asus */ /* Asus */
static const struct gpio_keys_button static const struct gpio_keys_button
...@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = { ...@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = {
static const struct gpio_keys_button static const struct gpio_keys_button
bcm47xx_buttons_asus_wl500w[] __initconst = { bcm47xx_buttons_asus_wl500w[] __initconst = {
BCM47XX_GPIO_KEY(6, KEY_RESTART), BCM47XX_GPIO_KEY_H(6, KEY_RESTART),
BCM47XX_GPIO_KEY(7, KEY_WPS_BUTTON), BCM47XX_GPIO_KEY_H(7, KEY_WPS_BUTTON),
}; };
static const struct gpio_keys_button static const struct gpio_keys_button
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment