diff mbox

[2/2] Fix the issue that V8 Button pad Stick button does not work

Message ID 20170314013413.7260-2-masaki.ota@jp.alps.com (mailing list archive)
State Accepted
Headers show

Commit Message

Masaki Ota March 14, 2017, 1:34 a.m. UTC
From: Masaki Ota <masaki.ota@jp.alps.com>
- V8 Button pad Stick Right and Middle button don't work.
- Alps stick devices have physical buttons absolutely, so delete "ALPS_BUTTONPAD" check Flag from Stick button process.

Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com>

Acked-by: Pali Rohar <pali.rohar@gmail.com>
---
 drivers/input/mouse/alps.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Paul Donohue March 14, 2017, 2:51 p.m. UTC | #1
On Tue, Mar 14, 2017 at 10:34:13AM +0900, Masaki Ota wrote:
> From: Masaki Ota <masaki.ota@jp.alps.com>
> - V8 Button pad Stick Right and Middle button don't work.
> - Alps stick devices have physical buttons absolutely, so delete "ALPS_BUTTONPAD" check Flag from Stick button process.
> 
> Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com>
> 
> Acked-by: Pali Rohar <pali.rohar@gmail.com>

Tested-by: Paul Donohue <linux-kernel@PaulSD.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov March 17, 2017, 9:26 p.m. UTC | #2
On Tue, Mar 14, 2017 at 10:34:13AM +0900, Masaki Ota wrote:
> From: Masaki Ota <masaki.ota@jp.alps.com>
> - V8 Button pad Stick Right and Middle button don't work.
> - Alps stick devices have physical buttons absolutely, so delete "ALPS_BUTTONPAD" check Flag from Stick button process.
> 
> Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com>
> 
> Acked-by: Pali Rohar <pali.rohar@gmail.com>

Reworded commit message, marked for stable and applied, thank you.

> ---
>  drivers/input/mouse/alps.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 253f742..262d105 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -1287,10 +1287,8 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
>  	/* handle buttons */
>  	if (pkt_id == SS4_PACKET_ID_STICK) {
>  		f->ts_left = !!(SS4_BTN_V2(p) & 0x01);
> -		if (!(priv->flags & ALPS_BUTTONPAD)) {
> -			f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
> -			f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
> -		}
> +		f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
> +		f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
>  	} else {
>  		f->left = !!(SS4_BTN_V2(p) & 0x01);
>  		if (!(priv->flags & ALPS_BUTTONPAD)) {
> -- 
> 2.9.3
>
diff mbox

Patch

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 253f742..262d105 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1287,10 +1287,8 @@  static int alps_decode_ss4_v2(struct alps_fields *f,
 	/* handle buttons */
 	if (pkt_id == SS4_PACKET_ID_STICK) {
 		f->ts_left = !!(SS4_BTN_V2(p) & 0x01);
-		if (!(priv->flags & ALPS_BUTTONPAD)) {
-			f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
-			f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
-		}
+		f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
+		f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
 	} else {
 		f->left = !!(SS4_BTN_V2(p) & 0x01);
 		if (!(priv->flags & ALPS_BUTTONPAD)) {