]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
Input: trackpoint - force 3 buttons if 0 button is reported
authorAaron Ma <aaron.ma@canonical.com>
Mon, 29 Jan 2018 14:32:24 +0000 (22:32 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 14 Mar 2018 10:41:11 +0000 (11:41 +0100)
commit1ae5a13a49ceabe7bea5f9155f91f7499a86e3eb
tree62a5cf3ba0212e24a7bab0af22470338f889e5bf
parentb8a6455d23b2455f47b89a135b40b67132fbcf4d
Input: trackpoint - force 3 buttons if 0 button is reported

BugLink: https://bugs.launchpad.net/bugs/1746002
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>
(cherry picked from commit f5d07b9e98022d50720e38aa936fc11c67868ece)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/input/mouse/trackpoint.c