SOURCES (LINUX_2_6_27): kernel-touchpad.patch (NEW) - backport (report touc...
arekm
arekm at pld-linux.org
Tue Feb 3 22:06:28 CET 2009
Author: arekm Date: Tue Feb 3 21:06:28 2009 GMT
Module: SOURCES Tag: LINUX_2_6_27
---- Log message:
- backport (report touch capabilities only when supported)
---- Files affected:
SOURCES:
kernel-touchpad.patch (NONE -> 1.1.2.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/kernel-touchpad.patch
diff -u /dev/null SOURCES/kernel-touchpad.patch:1.1.2.1
--- /dev/null Tue Feb 3 22:06:28 2009
+++ SOURCES/kernel-touchpad.patch Tue Feb 3 22:06:22 2009
@@ -0,0 +1,54 @@
+commit e42b6646a8298fe06a33a0f68dab661335f5db6e
+Author: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Thu Nov 20 15:24:42 2008 -0500
+
+ Input: synaptics - report multi-taps only if supported by the device
+
+ According to Section 2.4.4 of the Synaptics TouchPad Interfacing
+ Guide, bit 2 specifies if multi-finger detection is provided by
+ the touchpad. Thus, only set BTN_TOOL_DOUBLETAP and
+ BTN_TOOL_TRIPLETAP if the device actually supports it.
+
+ Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
+ Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
+
+diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
+index d349c4a..865fc69 100644
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -445,12 +445,14 @@ static void synaptics_process_packet(struct psmouse *psmouse)
+
+ input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
+ input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1);
+- input_report_key(dev, BTN_TOOL_DOUBLETAP, num_fingers == 2);
+- input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3);
+-
+ input_report_key(dev, BTN_LEFT, hw.left);
+ input_report_key(dev, BTN_RIGHT, hw.right);
+
++ if (SYN_CAP_MULTIFINGER(priv->capabilities)) {
++ input_report_key(dev, BTN_TOOL_DOUBLETAP, num_fingers == 2);
++ input_report_key(dev, BTN_TOOL_TRIPLETAP, num_fingers == 3);
++ }
++
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ input_report_key(dev, BTN_MIDDLE, hw.middle);
+
+@@ -543,12 +545,14 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
+ set_bit(EV_KEY, dev->evbit);
+ set_bit(BTN_TOUCH, dev->keybit);
+ set_bit(BTN_TOOL_FINGER, dev->keybit);
+- set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
+- set_bit(BTN_TOOL_TRIPLETAP, dev->keybit);
+-
+ set_bit(BTN_LEFT, dev->keybit);
+ set_bit(BTN_RIGHT, dev->keybit);
+
++ if (SYN_CAP_MULTIFINGER(priv->capabilities)) {
++ set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
++ set_bit(BTN_TOOL_TRIPLETAP, dev->keybit);
++ }
++
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ set_bit(BTN_MIDDLE, dev->keybit);
+
================================================================
More information about the pld-cvs-commit
mailing list