Skip to content

Commit

Permalink
Input: trackpoint - add new trackpoint firmware ID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaron Ma authored and Dmitry Torokhov committed Aug 19, 2017
1 parent 1d2226e commit ec66768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/input/mouse/trackpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir
if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
return -1;

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

if (firmware_id)
Expand Down
3 changes: 2 additions & 1 deletion drivers/input/mouse/trackpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
#define TP_COMMAND 0xE2 /* Commands start with this */

#define TP_READ_ID 0xE1 /* Sent for device identification */
#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */
#define TP_MAGIC_IDENT 0x03 /* Sent after a TP_READ_ID followed */
/* by the firmware ID */
/* Firmware ID includes 0x1, 0x2, 0x3 */


/*
Expand Down

0 comments on commit ec66768

Please sign in to comment.