From aa6e1edafeaabedea04e8abc2047ffd8b8a8722d Mon Sep 17 00:00:00 2001 From: Vojtech Pavlik Date: Fri, 26 Sep 2003 12:58:13 +0200 Subject: input: Add BTN_TOUCH to Synaptics pad driver. This fixes the joydev grabbing of the pads, as well as simplifies the mousedev driver. --- drivers/input/mouse/synaptics.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/input/mouse') 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); -- cgit v1.2.3