[SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Aaron Ma
BugLink: https://bugs.launchpad.net/bugs/1779802

[Impact]
On ThinkPad P52, Elantech touchpad had sync issue then failed to work.
Middle button was not enabled too.

[Fix]
With two upstream patches, elantech touchpad works fine with middle button.

[Test Case]
Touchpad moves fine, left/right/middle buttons works fine. scroll mode
works fine.

[Regression Potential]
Very low, Just enable specific hardware support.

??? (1):
  Input: elantech - fix V4 report decoding for module with middle key

Aaron Ma (1):
  Input: elantech - enable middle button of touchpads on ThinkPad P52

 drivers/input/mouse/elantech.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] Input: elantech - fix V4 report decoding for module with middle key

Aaron Ma
From: ??? <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1779802

Some touchpad has middle key and it will be indicated in bit 2 of packet[0].
We need to fix V4 formation's byte mask to prevent error decoding.

Signed-off-by: KT Liao <[hidden email]>
Cc: [hidden email]
Signed-off-by: Dmitry Torokhov <[hidden email]>
(cherry picked from commit e0ae2519ca004a628fa55aeef969c37edce522d3)
Signed-off-by: Aaron Ma <[hidden email]>
---
 drivers/input/mouse/elantech.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index a4aaa748e987..a4f18d5cc88d 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -804,7 +804,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
  else if (ic_version == 7 && etd->samples[1] == 0x2A)
  sanity_check = ((packet[3] & 0x1c) == 0x10);
  else
- sanity_check = ((packet[0] & 0x0c) == 0x04 &&
+ sanity_check = ((packet[0] & 0x08) == 0x00 &&
  (packet[3] & 0x1c) == 0x10);
 
  if (!sanity_check)
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] Input: elantech - enable middle button of touchpads on ThinkPad P52

Aaron Ma
In reply to this post by Aaron Ma
BugLink: https://bugs.launchpad.net/bugs/1779802

PNPID is better way to identify the type of touchpads.
Enable middle button support on 2 types of touchpads on Lenovo P52.

Cc: [hidden email]
Signed-off-by: Aaron Ma <[hidden email]>
Reviewed-by: Benjamin Tissoires <[hidden email]>
Signed-off-by: Dmitry Torokhov <[hidden email]>
(cherry picked from commit 24bb555e6e46d96e2a954aa0295029a81cc9bbaa)
Signed-off-by: Aaron Ma <[hidden email]>
---
 drivers/input/mouse/elantech.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index a4f18d5cc88d..a250f433eb96 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1177,6 +1177,12 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = {
  { }
 };
 
+static const char * const middle_button_pnp_ids[] = {
+ "LEN2131", /* ThinkPad P52 w/ NFC */
+ "LEN2132", /* ThinkPad P52 */
+ NULL
+};
+
 /*
  * Set the appropriate event bits for the input subsystem
  */
@@ -1196,7 +1202,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
  __clear_bit(EV_REL, dev->evbit);
 
  __set_bit(BTN_LEFT, dev->keybit);
- if (dmi_check_system(elantech_dmi_has_middle_button))
+ if (dmi_check_system(elantech_dmi_has_middle_button) ||
+ psmouse_matches_pnp_id(psmouse, middle_button_pnp_ids))
  __set_bit(BTN_MIDDLE, dev->keybit);
  __set_bit(BTN_RIGHT, dev->keybit);
 
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Hui Wang
In reply to this post by Aaron Ma
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Wen-chien Jesse Sung
In reply to this post by Aaron Ma
Acked-By: Wen-chien Jesse Sung <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Aaron Ma
In reply to this post by Aaron Ma
Hi Seth:

Will these two patches be applied in Bionic kernel?

Regards,
Aaron

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [SRU][A/B/OEM-X][PATCH 0/2] Fix Elantech touchpad issue on ThinkPad P52

Kleber Souza
On 07/12/18 13:27, Aaron Ma wrote:
> Hi Seth:
>
> Will these two patches be applied in Bionic kernel?
>
> Regards,
> Aaron
>

Hi Aaron,

Seth is responsible for patches for the development series (currently
Cosmic and unstable). SRU patches are handled by the stable team (which
I'm part of).

So to answer your question: the patched will be considered for the next
SRU cycle if it has two ACK's before its cutoff date, which is currently
scheduled for 25-Jul.


Best,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team