linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Schmidt <yath@yath.de>
To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Cc: Greg KH <gregkh@linuxfoundation.org>, Aaron Ma <aaron.ma@canonical.com>
Subject: [PATCH] Revert "Input: trackpoint - add new trackpoint firmware ID"
Date: Sat, 30 Dec 2017 16:22:13 +0100	[thread overview]
Message-ID: <20171230152213.GA2099@marax.lan.yath.de> (raw)

This reverts commit ec667683c532c93fb41e100e5d61a518971060e2, which
breaks the Trackpoint on ThinkPad X1 Carbon Gen5 (Model 20HR). That
commit intended to add support for later firmware versions to the
trackpoint driver, however, the version is reported in the second byte
whereas the change was made to the magic byte preceding that version.
The update package linked by Lenovo suggests that 20HR models use an
ALPS Touchpad instead.

Signed-off-by: Sebastian Schmidt <yath@yath.de>
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
---
 drivers/input/mouse/trackpoint.c | 3 +--
 drivers/input/mouse/trackpoint.h | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
index 0871010f18d5..20b5b21c1bba 100644
--- a/drivers/input/mouse/trackpoint.c
+++ b/drivers/input/mouse/trackpoint.c
@@ -265,8 +265,7 @@ 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;
 
-	/* add new TP ID. */
-	if (!(param[0] & TP_MAGIC_IDENT))
+	if (param[0] != TP_MAGIC_IDENT)
 		return -1;
 
 	if (firmware_id)
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
index 88055755f82e..5617ed3a7d7a 100644
--- a/drivers/input/mouse/trackpoint.h
+++ b/drivers/input/mouse/trackpoint.h
@@ -21,9 +21,8 @@
 #define TP_COMMAND		0xE2	/* Commands start with this */
 
 #define TP_READ_ID		0xE1	/* Sent for device identification */
-#define TP_MAGIC_IDENT		0x03	/* Sent after a TP_READ_ID followed */
+#define TP_MAGIC_IDENT		0x01	/* Sent after a TP_READ_ID followed */
 					/* by the firmware ID */
-					/* Firmware ID includes 0x1, 0x2, 0x3 */
 
 
 /*
-- 
2.15.1


             reply	other threads:[~2017-12-30 15:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-30 15:22 Sebastian Schmidt [this message]
2017-12-30 15:32 ` [PATCH] Revert "Input: trackpoint - add new trackpoint firmware ID" Greg KH
2017-12-30 15:41   ` Sebastian Schmidt
2017-12-31  4:37 ` Aaron Ma
2017-12-31  8:26   ` Greg KH
2017-12-31  8:51     ` Aaron Ma
2018-01-02  7:08       ` Dmitry Torokhov
2018-01-02 13:57         ` Aaron Ma
2018-01-05  0:56           ` Dmitry Torokhov
2018-01-05 13:29             ` Aaron Ma
2018-01-05 16:23               ` Dmitry Torokhov
2018-01-07  6:52                 ` Dmitry Torokhov
2018-01-08 15:11                   ` Sebastian Schmidt
2018-01-09  0:40                     ` Dmitry Torokhov
2018-01-09  1:35                       ` Peter Hutterer
2018-01-14 20:39                   ` ulrik.debie-os
2018-01-14 20:57                     ` ulrik.debie-os
2018-01-16 23:49                     ` Dmitry Torokhov
2018-01-21 20:37                       ` ulrik.debie-os
2018-01-21 21:08                         ` Dmitry Torokhov
2018-01-22 18:41                           ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171230152213.GA2099@marax.lan.yath.de \
    --to=yath@yath.de \
    --cc=aaron.ma@canonical.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).