diff options
Diffstat (limited to 'drivers/input/mouse')
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 4 |
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); |
