summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2003-09-26 12:58:13 +0200
committerLinus Torvalds <torvalds@home.osdl.org>2003-09-26 12:58:13 +0200
commitaa6e1edafeaabedea04e8abc2047ffd8b8a8722d (patch)
treeecd7cd7cb88ee58c984545d170347451fbee3a98 /drivers/input/mouse
parentc88d81805bccaa61ddf4f3308b6bfb282e4967a3 (diff)
input: Add BTN_TOUCH to Synaptics pad driver. This fixes the joydev
grabbing of the pads, as well as simplifies the mousedev driver.
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/synaptics.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index d39cf3d4288b..8862638750b9 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -333,6 +333,7 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
set_bit(ABS_TOOL_WIDTH, dev->absbit);
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);
@@ -532,6 +533,9 @@ static void synaptics_process_packet(struct psmouse *psmouse)
}
input_report_abs(dev, ABS_PRESSURE, hw.z);
+ if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
+ if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
+
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);