Skip to contentSkip to conversation

Patch "MIPS: BCM47XX: Fix button inversion for Asus WL-500W" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Mar 8, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

MIPS: BCM47XX: Fix button inversion for Asus WL-500W

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-bcm47xx-fix-button-inversion-for-asus-wl-500w.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From bdfdaf1a016ef09cb941f2edad485a713510b8d5 Mon Sep 17 00:00:00 2001

From: Mirko Parthey <[email protected]>
Date: Wed, 15 Feb 2017 23:31:30 +0100
Subject: MIPS: BCM47XX: Fix button inversion for Asus WL-500W
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Mirko Parthey <[email protected]>

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")
Cc Hauke Mehrtens <[email protected]>

Patchwork: https://patchwork.linux-mips.org/patch/15295/

---
 arch/mips/bcm47xx/buttons.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
arch/mips/bcm47xx/buttons.c +8 -2
@@ -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[] __initc
 
 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

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/mips-bcm47xx-fix-button-inversion-for-asus-wl-500w.patch