diff options
author | Laura Abbott <labbott@fedoraproject.org> | 2015-09-01 15:03:08 -0700 |
---|---|---|
committer | Laura Abbott <labbott@fedoraproject.org> | 2015-09-01 15:59:56 -0700 |
commit | d07b889185195409a6090ed3e12fff475b4258f4 (patch) | |
tree | c2b98784a9c45c2ba5420c4a256c03d1c1c2e125 /elantech-Deal-with-clickpads-reporting-right-button-.patch | |
parent | 07775e21b6d0c7b9c2251deb8cb5ef3052a38c6e (diff) | |
download | kernel-d07b889185195409a6090ed3e12fff475b4258f4.tar.gz kernel-d07b889185195409a6090ed3e12fff475b4258f4.tar.xz kernel-d07b889185195409a6090ed3e12fff475b4258f4.zip |
Linux v4.2
This is a squashed patch of the history from F22 + the 4.2 rebase
Diffstat (limited to 'elantech-Deal-with-clickpads-reporting-right-button-.patch')
-rw-r--r-- | elantech-Deal-with-clickpads-reporting-right-button-.patch | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/elantech-Deal-with-clickpads-reporting-right-button-.patch b/elantech-Deal-with-clickpads-reporting-right-button-.patch deleted file mode 100644 index 4da9e65b6..000000000 --- a/elantech-Deal-with-clickpads-reporting-right-button-.patch +++ /dev/null @@ -1,79 +0,0 @@ -Bugzilla: 1103528 -Upstream-status: Sent for 3.16 - -From 3b629bf4b018ece0c7b4d1c03bdc0eb69c884531 Mon Sep 17 00:00:00 2001 -From: Hans de Goede <hdegoede@redhat.com> -Date: Thu, 5 Jun 2014 11:48:30 +0200 -Subject: [PATCH] elantech: Deal with clickpads reporting right button events - -At least the Dell Vostro 5470 elantech *clickpad* reports right button -clicks when clicked in the right bottom area. - -This is different from how (elantech) clickpads normally operate, -normally no matter where the user clicks on the pad the pad always reports -a left button event, since there is only 1 hardware button beneath the path. - -It is unknown if this is caused by Dell having put 2 buttons under the pad, -one under each bottom corner, or if this is something caused by the specific -firmware in this clickpad. - -Since this however still clearly is a real clickpad hardware-wise, we still -want to report it as such to userspace, so that things like finger movement -in the bottom area can be properly ignored as it should be on clickpads. - -So deal with this weirdness by simply mapping a right click to a left click -on elantech clickpads. As an added advantage this is something which we can -simply do on all elantech clickpads, so no need to add special quirks for -this weird model. - -Reported-by: Elder Marco <eldermarco@gmail.com> -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/input/mouse/elantech.c | 22 ++++++++++++++++++---- - 1 file changed, 18 insertions(+), 4 deletions(-) - -diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c -index 4d79821..846926d 100644 ---- a/drivers/input/mouse/elantech.c -+++ b/drivers/input/mouse/elantech.c -@@ -473,8 +473,15 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse, - input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); - input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2); - input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3); -- input_report_key(dev, BTN_LEFT, packet[0] & 0x01); -- input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); -+ -+ /* For clickpads map both buttons to BTN_LEFT */ -+ if (etd->fw_version & 0x001000) { -+ input_report_key(dev, BTN_LEFT, packet[0] & 0x03); -+ } else { -+ input_report_key(dev, BTN_LEFT, packet[0] & 0x01); -+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); -+ } -+ - input_report_abs(dev, ABS_PRESSURE, pres); - input_report_abs(dev, ABS_TOOL_WIDTH, width); - -@@ -484,10 +491,17 @@ static void elantech_report_absolute_v3(struct psmouse *psmouse, - static void elantech_input_sync_v4(struct psmouse *psmouse) - { - struct input_dev *dev = psmouse->dev; -+ struct elantech_data *etd = psmouse->private; - unsigned char *packet = psmouse->packet; - -- input_report_key(dev, BTN_LEFT, packet[0] & 0x01); -- input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); -+ /* For clickpads map both buttons to BTN_LEFT */ -+ if (etd->fw_version & 0x001000) { -+ input_report_key(dev, BTN_LEFT, packet[0] & 0x03); -+ } else { -+ input_report_key(dev, BTN_LEFT, packet[0] & 0x01); -+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02); -+ } -+ - input_mt_report_pointer_emulation(dev, true); - input_sync(dev); - } --- -2.0.0 - |