stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "Input: elantech - force relative mode on a certain module" has been added to the 4.9-stable tree
@ 2018-04-09 19:58 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-04-09 19:58 UTC (permalink / raw)
  To: kt.liao, alexander.levin, dmitry.torokhov, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    Input: elantech - force relative mode on a certain module

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     input-elantech-force-relative-mode-on-a-certain-module.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon Apr  9 17:09:24 CEST 2018
From: KT Liao <kt.liao@emc.com.tw>
Date: Mon, 12 Dec 2016 11:03:42 -0800
Subject: Input: elantech - force relative mode on a certain module

From: KT Liao <kt.liao@emc.com.tw>


[ Upstream commit d899520b0431e70279bfb5066ecb6dc91d0b7072 ]

One of Elan modules with sample version is 0x74 and hw_version is 0x03 has
a bug in absolute mode implementation, so let it run in default PS/2
relative mode.

Signed-off-by: KT Liao <kt.liao@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/mouse/elantech.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1711,6 +1711,17 @@ int elantech_init(struct psmouse *psmous
 			     etd->samples[0], etd->samples[1], etd->samples[2]);
 	}
 
+	if (etd->samples[1] == 0x74 && etd->hw_version == 0x03) {
+		/*
+		 * This module has a bug which makes absolute mode
+		 * unusable, so let's abort so we'll be using standard
+		 * PS/2 protocol.
+		 */
+		psmouse_info(psmouse,
+			     "absolute mode broken, forcing standard PS/2 protocol\n");
+		goto init_fail;
+	}
+
 	if (elantech_set_absolute_mode(psmouse)) {
 		psmouse_err(psmouse,
 			    "failed to put touchpad into absolute mode.\n");


Patches currently in stable-queue which might be from kt.liao@emc.com.tw are

queue-4.9/input-elantech-force-relative-mode-on-a-certain-module.patch
queue-4.9/input-elan_i2c-clear-int-before-resetting-controller.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-09 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09 19:58 Patch "Input: elantech - force relative mode on a certain module" has been added to the 4.9-stable tree gregkh

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).