HID: ntrig: Emit TOUCH with DOUBLETAP for single touch
authorRafi Rubin <rafi@seas.upenn.edu>
Fri, 9 Apr 2010 21:58:25 +0000 (17:58 -0400)
committerJiri Kosina <jkosina@suse.cz>
Tue, 13 Apr 2010 13:22:59 +0000 (15:22 +0200)
I squelched TipSwitch in a recent patch which resulted in the loss
of Touch events for single touch firmwares.  This patch just puts Touch back
in for single touch, and bundles it with DoubleTap (like the multitouch code).
The two events are used to convey the same message to different drivers.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ntrig.c

index a418f9e19ce75bd06759b7f0ad5262ce160175d2..58ba0d3d8aa5c7114e0d74b8383f9eba6c08eb1a 100644 (file)
@@ -173,6 +173,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
                        if (!nd->reading_mt) {
                                input_report_key(input, BTN_TOOL_DOUBLETAP,
                                                 (nd->confidence != 0));
+                               input_report_key(input, BTN_TOUCH,
+                                                (nd->confidence != 0));
                                input_event(input, EV_ABS, ABS_X, nd->x);
                                input_event(input, EV_ABS, ABS_Y, nd->y);
                        }