Skip to content

Commit 5609ae9

Browse files
pyma1gregkh
authored andcommitted
Input: trackpoint - add new trackpoint firmware ID
commit ec667683c532c93fb41e100e5d61a518971060e2 upstream. 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> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a56800a commit 5609ae9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/input/mouse/trackpoint.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir
265265
if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
266266
return -1;
267267

268-
if (param[0] != TP_MAGIC_IDENT)
268+
/* add new TP ID. */
269+
if (!(param[0] & TP_MAGIC_IDENT))
269270
return -1;
270271

271272
if (firmware_id)

drivers/input/mouse/trackpoint.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
#define TP_COMMAND 0xE2 /* Commands start with this */
2222

2323
#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 */
2525
/* by the firmware ID */
26+
/* Firmware ID includes 0x1, 0x2, 0x3 */
2627

2728

2829
/*

0 commit comments

Comments
 (0)