From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Aaron Ma <aaron.ma@canonical.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: trackpoint - force 3 buttons if 0 button is reported
Date: Fri, 12 Jan 2018 00:39:40 -0800 [thread overview]
Message-ID: <20180112083940.p36qj6ltzzwtuhng@dtor-ws> (raw)
In-Reply-To: <20180112064658.25019-1-aaron.ma@canonical.com>
On Fri, Jan 12, 2018 at 02:46:58PM +0800, Aaron Ma wrote:
> Lenovo introduced trackpoint compatible sticks with minimum PS/2 commands.
> Some of these sticks with 3 buttons always return 0 when reading
> extended button info, set it as 3 buttons to enable middle button.
Does it only happen with newer ELan/ALPS/NXP trackpoints, or also with
trackpoints advertising the original 0x010E version? What devices
respond with 0 as button info?
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/input/mouse/trackpoint.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
> index 0871010f18d5..00c0d1706567 100644
> --- a/drivers/input/mouse/trackpoint.c
> +++ b/drivers/input/mouse/trackpoint.c
> @@ -383,6 +383,10 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
> if (trackpoint_read(ps2dev, TP_EXT_BTN, &button_info)) {
> psmouse_warn(psmouse, "failed to get extended button data, assuming 3 buttons\n");
> button_info = 0x33;
> + } else if (!button_info) {
> + psmouse_warn(psmouse,
> + "got no extended button data, assuming 3 buttons\n");
> + button_info = 0x33;
> }
>
> psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL);
> --
> 2.14.3
>
--
Dmitry
next prev parent reply other threads:[~2018-01-12 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 6:46 [PATCH] Input: trackpoint - force 3 buttons if 0 button is reported Aaron Ma
2018-01-12 8:39 ` Dmitry Torokhov [this message]
2018-01-12 12:45 ` Aaron Ma
2018-01-12 18:18 ` Dmitry Torokhov
2018-01-13 2:34 ` Aaron Ma
2018-01-16 23:07 ` Dmitry Torokhov
2018-01-21 20:10 ` ulrik.debie-os
2018-01-21 21:14 ` 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=20180112083940.p36qj6ltzzwtuhng@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=aaron.ma@canonical.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox