]> git.baikalelectronics.ru Git - kernel.git/commit
Input: trackpoint - force 3 buttons if 0 button is reported
authorAaron Ma <aaron.ma@canonical.com>
Fri, 19 Jan 2018 17:43:39 +0000 (09:43 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 23 Jan 2018 00:23:17 +0000 (16:23 -0800)
commit1d43c74e7f9bb4468124f85daa470dacdbfa1d43
treed18595662c11b06f2196ca190ade7f104ab1eac2
parentcb3c0ceed81b8f8aab14c29dadb5873ff7e9d91b
Input: trackpoint - force 3 buttons if 0 button is reported

Lenovo introduced trackpoint compatible sticks with minimum PS/2 commands.
They supposed to reply with 0x02, 0x03, or 0x04 in response to the
"Read Extended ID" command, so we would know not to try certain extended
commands. Unfortunately even some trackpoints reporting the original IBM
version (0x01 firmware 0x0e) now respond with incorrect data to the "Get
Extended Buttons" command:

 thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown
 thinkpad_acpi: Lenovo ThinkPad E470, model 20H1004SGE

 psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

Since there are no trackpoints without buttons, let's assume the trackpoint
has 3 buttons when we get 0 response to the extended buttons query.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196253
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/trackpoint.c