All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Hans de Bruin <jmdebruin@xmsnet.nl>, linux-input@vger.kernel.org
Subject: Re: [PATCH] alps: Non interleaved V2 dualpoint has separate stick button bits
Date: Wed, 8 Apr 2015 09:24:30 -0700	[thread overview]
Message-ID: <20150408162430.GA10344@dtor-ws> (raw)
In-Reply-To: <1428509092-25794-1-git-send-email-hdegoede@redhat.com>

On Wed, Apr 08, 2015 at 06:04:52PM +0200, Hans de Goede wrote:
> Non interleaved V2 dualpoint touchpad / stick combos have separate stick
> button bits in the touchpad packets, if we do not check these then the
> trackpoint buttons will not work when using the touchpad, and when pressed
> when the user starts using the touchpad will report a release event even
> though the button is still pressed.
> 
> This commit fixes this by checking the separate bits, note that we simply
> combine the buttons, since the hardware does the same when using the touchpad
> buttons with the trackpoint, so we do not have enough information to properly
> separate them.

Hmm, if they are designated as trackstick buttons why don't we report
them as such (i.e. send button events out of dev2 without movement)?

Also, should we make note of this in alps.txt?

Thanks!

> 
> Reported-by: Hans de Bruin <jmdebruin@xmsnet.nl>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/input/mouse/alps.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 6962c26..58987b5 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -243,6 +243,14 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
>  		return;
>  	}
>  
> +	/* 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;
> +	}
> +
>  	alps_report_buttons(dev, dev2, left, right, middle);
>  
>  	/* Convert hardware tap to a reasonable Z value */
> -- 
> 2.3.4
> 

-- 
Dmitry

  reply	other threads:[~2015-04-08 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 16:04 [PATCH] alps: Non interleaved V2 dualpoint has separate stick button bits Hans de Goede
2015-04-08 16:24 ` Dmitry Torokhov [this message]
2015-04-08 17:05   ` Hans de Goede
2015-04-08 17:38     ` Dmitry Torokhov
2015-04-09 12:49       ` Hans de Goede
2015-04-12 22:59         ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150408162430.GA10344@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=jmdebruin@xmsnet.nl \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.