Re: [PATCH 1/1] Input - alps: Fix button reporting on the V2 Alps protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 29 July 2015 16:45:26 cpaul@xxxxxxxxxx wrote:
> From: Stephen Chandler Paul <cpaul@xxxxxxxxxx>
> 
> The data concerning which buttons on the touchpad are held down or not
> are in the fourth packet we receive from the mouse, not the first.
> 
> Signed-off-by: Stephen Chandler Paul <cpaul@xxxxxxxxxx>
> ---
>  drivers/input/mouse/alps.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 113d6f1..e2f9b25 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -254,9 +254,9 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
>  	/* Non interleaved V2 dualpoint has separate stick button bits */
>  	if (priv->proto_version == ALPS_PROTO_V2 &&
>  	    priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) {
> -		left |= packet[0] & 1;
> -		right |= packet[0] & 2;
> -		middle |= packet[0] & 4;
> +		left |= packet[3] & 1;
> +		right |= packet[3] & 2;
> +		middle |= packet[3] & 4;
>  	}
>  
>  	alps_report_buttons(dev, dev2, left, right, middle);

This patch will break other ALPS devices...
So we cannot accept it :-(

Looks like some proto v2 devices report button clicks in packet[0] and
some in packet[3].

Any idea how to fix it correctly? Do you have other laptops with proto
V2 ALPS devices, to do more tests and dumps and distinguish buttons?

-- 
Pali Rohár
pali.rohar@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux