aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAaron Ma <aaron.ma@canonical.com>2017-08-18 15:17:21 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-08-18 20:04:11 -0400
commitec667683c532c93fb41e100e5d61a518971060e2 (patch)
treefaa3f0b351f1fd183a0a434c2c12c3338229c61a /drivers
parent1d2226e45040ed4aee95b633cbd64702bf7fc2a1 (diff)
Input: trackpoint - add new trackpoint firmware ID
Synaptics add new TP firmware ID: 0x2 and 0x3, for now both lower 2 bits are indicated as TP. Change the constant to bitwise values. This makes trackpoint to be recognized on Lenovo Carbon X1 Gen5 instead of it being identified as "PS/2 Generic Mouse". Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/mouse/trackpoint.c3
-rw-r--r--drivers/input/mouse/trackpoint.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
index 20b5b21c1bba..0871010f18d5 100644
--- a/drivers/input/mouse/trackpoint.c
+++ b/drivers/input/mouse/trackpoint.c
@@ -265,7 +265,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir
265 if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) 265 if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
266 return -1; 266 return -1;
267 267
268 if (param[0] != TP_MAGIC_IDENT) 268 /* add new TP ID. */
269 if (!(param[0] & TP_MAGIC_IDENT))
269 return -1; 270 return -1;
270 271
271 if (firmware_id) 272 if (firmware_id)
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
index 5617ed3a7d7a..88055755f82e 100644
--- a/drivers/input/mouse/trackpoint.h
+++ b/drivers/input/mouse/trackpoint.h
@@ -21,8 +21,9 @@
21#define TP_COMMAND 0xE2 /* Commands start with this */ 21#define TP_COMMAND 0xE2 /* Commands start with this */
22 22
23#define TP_READ_ID 0xE1 /* Sent for device identification */ 23#define TP_READ_ID 0xE1 /* Sent for device identification */
24#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */ 24#define TP_MAGIC_IDENT 0x03 /* Sent after a TP_READ_ID followed */
25 /* by the firmware ID */ 25 /* by the firmware ID */
26 /* Firmware ID includes 0x1, 0x2, 0x3 */
26 27
27 28
28/* 29/*