* [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W
@ 2017-02-15 22:31 Mirko Parthey
2017-02-15 22:36 ` Rafał Miłecki
2017-02-17 11:25 ` James Hogan
0 siblings, 2 replies; 3+ messages in thread
From: Mirko Parthey @ 2017-02-15 22:31 UTC (permalink / raw)
To: Hauke Mehrtens, Rafał Miłecki; +Cc: linux-mips
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(-)
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 @@
.active_low = 1, \
}
+#define BCM47XX_GPIO_KEY_H(_gpio, _code) \
+ { \
+ .code = _code, \
+ .gpio = _gpio, \
+ }
+
/* Asus */
static const struct gpio_keys_button
@@ -79,8 +85,8 @@ bcm47xx_buttons_asus_wl500gpv2[] __initconst = {
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
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W
2017-02-15 22:31 [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W Mirko Parthey
@ 2017-02-15 22:36 ` Rafał Miłecki
2017-02-17 11:25 ` James Hogan
1 sibling, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2017-02-15 22:36 UTC (permalink / raw)
To: Mirko Parthey, Hauke Mehrtens, Ralf Baechle; +Cc: linux-mips
On 02/15/2017 11:31 PM, Mirko Parthey wrote:
> 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>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W
2017-02-15 22:31 [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W Mirko Parthey
2017-02-15 22:36 ` Rafał Miłecki
@ 2017-02-17 11:25 ` James Hogan
1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2017-02-17 11:25 UTC (permalink / raw)
To: Mirko Parthey; +Cc: Hauke Mehrtens, Rafał Miłecki, linux-mips
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
On Wed, Feb 15, 2017 at 11:31:30PM +0100, Mirko Parthey wrote:
> 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>
Applied (with fixes/stable tag for 3.14 onwards).
Thanks
James
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-17 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 22:31 [PATCH] MIPS: bcm47xx: Fix button inversion for Asus WL-500W Mirko Parthey
2017-02-15 22:36 ` Rafał Miłecki
2017-02-17 11:25 ` James Hogan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.