linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] Input - synaptics: remove TOPBUTTONPAD property for Lenovos 2015
Date: Mon, 2 Feb 2015 13:59:56 -0800	[thread overview]
Message-ID: <20150202215956.GD23909@dtor-ws> (raw)
In-Reply-To: <1422475807-15033-4-git-send-email-benjamin.tissoires@redhat.com>

On Wed, Jan 28, 2015 at 03:10:06PM -0500, Benjamin Tissoires wrote:
> The 2015 series of the Lenovo thinkpads added back the hardware buttons
> on top of the touchpad for the trackstick.
> 
> Unfortunately, they are wired to the touchpad, and not the trackstick.
> Thus, they are seen as extra buttons from the kernel point of view.
> 
> This leads to a problem in user space because extra buttons on synaptics
> devices used to be used as scroll up/down buttons. So in the end, the
> experience for the user is scroll events for buttons left and right
> when using the trackstick. Yay!
> Still, this user space problem will be fixed in the user space, and
> the kernel will only handle the TOPBUTTONPAD property - which was not
> a good idea to introduce in the kernel in the first place, I concede.
> 
> Furthermore, Lenovo kept using the PNPIDs that are supposed to be
> "5 buttons" touchpads, so the new laptops also have the
> INPUT_PROP_TOPBUTTONPAD. Yay again!
> 
> Insteead of manually removing each of the new ones, or hoping that we
> know all the current ones, we can consider that the PNPIDs list that
> were given contains touchpads that have the trackstick buttons, either
> physically wired to them, or emulated with the top software button
> property.
> 
> Thanks to the extra buttons capability, we can reliably detect the
> physical buttons from the software ones, and so we can remove the
> TOPBUTTONPAD property even if it was declared as such.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>  drivers/input/mouse/synaptics.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index d58863b..4f05c9f 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -1129,7 +1129,8 @@ static void set_input_params(struct psmouse *psmouse,
>  
>  	if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) {
>  		__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
> -		if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids))
> +		if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) &&
> +		    !test_bit(BTN_0, dev->keybit))

I do not really like this kind of heuristic, but all
topbuttonpad_pnp_ids are currently Lenovos so I guess it's OK and I'll
apply the patch.

Regarding the tracksick/touchpad buttons I would not mind if we'd mix
them in into pass-through port data - kernel's task is to make sense of
hardware for userspace and in this case raw picture does not seem to
make much sense...

Thanks.

>  			__set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit);
>  		/* Clickpads report only left button */
>  		__clear_bit(BTN_RIGHT, dev->keybit);
> -- 
> 2.1.0
> 

-- 
Dmitry

  reply	other threads:[~2015-02-02 21:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:10 [PATCH 0/4] New Lenovos 2015 touchpads: party time! Benjamin Tissoires
2015-01-28 20:10 ` [PATCH 1/4] Input - synaptics: fix middle button on Lenovo 2015 products Benjamin Tissoires
2015-02-02 22:54   ` Dmitry Torokhov
2015-02-04 19:43     ` Benjamin Tissoires
2015-02-04 19:53       ` Dmitry Torokhov
2015-01-28 20:10 ` [PATCH 2/4] Input - synaptics: do not release extra buttons once they are pressed Benjamin Tissoires
2015-02-02 21:46   ` Dmitry Torokhov
2015-02-02 22:14     ` Benjamin Tissoires
2015-02-04 21:29       ` Benjamin Tissoires
2015-02-05  1:53         ` Andrew Duggan
2015-02-06  1:54         ` Andrew Duggan
2015-01-28 20:10 ` [PATCH 3/4] Input - synaptics: remove TOPBUTTONPAD property for Lenovos 2015 Benjamin Tissoires
2015-02-02 21:59   ` Dmitry Torokhov [this message]
2015-01-28 20:10 ` [PATCH 4/4] Input - synaptics: Remove X1 Carbon 3rd gen from the topbuttonpad list Benjamin Tissoires
2015-01-29  7:52 ` [PATCH 0/4] New Lenovos 2015 touchpads: party time! Hans de Goede

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=20150202215956.GD23909@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).