aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafi Rubin <rafi@seas.upenn.edu>2010-05-03 05:08:30 -0400
committerJiri Kosina <jkosina@suse.cz>2010-05-03 09:23:11 -0400
commited7e2ca24bfff5c7a09de8a05c536f68560b34fb (patch)
tree2118ed170ebc7a1bf2337ce266a18b75d568d788 /drivers
parent250d377522fd81459a4ea2350a794b453f37ce7d (diff)
HID: ntrig: Remove unused macro, TripleTap and QuadTap
Removing the higher number taps. Their usage was incorrect and even if correct they should not be used for a touch screen. _MT_ events should be used to communicate multiple fingers. Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-ntrig.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 10b08d6ab37c..4777bbfa1cc2 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -24,9 +24,6 @@
24 24
25#define NTRIG_DUPLICATE_USAGES 0x001 25#define NTRIG_DUPLICATE_USAGES 0x001
26 26
27#define nt_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \
28 EV_KEY, (c))
29
30struct ntrig_data { 27struct ntrig_data {
31 /* Incoming raw values for a single contact */ 28 /* Incoming raw values for a single contact */
32 __u16 x, y, w, h; 29 __u16 x, y, w, h;
@@ -257,29 +254,10 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
257 nd->reading_mt = 0; 254 nd->reading_mt = 0;
258 255
259 if (nd->first_contact_touch) { 256 if (nd->first_contact_touch) {
260 switch (value) { 257 input_report_key(input, BTN_TOOL_DOUBLETAP, 1);
261 case 0: /* for single touch devices */
262 case 1:
263 input_report_key(input,
264 BTN_TOOL_DOUBLETAP, 1);
265 break;
266 case 2:
267 input_report_key(input,
268 BTN_TOOL_TRIPLETAP, 1);
269 break;
270 case 3:
271 default:
272 input_report_key(input,
273 BTN_TOOL_QUADTAP, 1);
274 }
275 input_report_key(input, BTN_TOUCH, 1); 258 input_report_key(input, BTN_TOUCH, 1);
276 } else { 259 } else {
277 input_report_key(input, 260 input_report_key(input, BTN_TOOL_DOUBLETAP, 0);
278 BTN_TOOL_DOUBLETAP, 0);
279 input_report_key(input,
280 BTN_TOOL_TRIPLETAP, 0);
281 input_report_key(input,
282 BTN_TOOL_QUADTAP, 0);
283 input_report_key(input, BTN_TOUCH, 0); 261 input_report_key(input, BTN_TOUCH, 0);
284 } 262 }
285 break; 263 break;
@@ -345,13 +323,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
345 __clear_bit(BTN_TOOL_PEN, input->keybit); 323 __clear_bit(BTN_TOOL_PEN, input->keybit);
346 __clear_bit(BTN_TOOL_FINGER, input->keybit); 324 __clear_bit(BTN_TOOL_FINGER, input->keybit);
347 __clear_bit(BTN_0, input->keybit); 325 __clear_bit(BTN_0, input->keybit);
348 /*
349 * A little something special to enable
350 * two and three finger taps.
351 */
352 __set_bit(BTN_TOOL_DOUBLETAP, input->keybit); 326 __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
353 __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
354 __set_bit(BTN_TOOL_QUADTAP, input->keybit);
355 /* 327 /*
356 * The physical touchscreen (single touch) 328 * The physical touchscreen (single touch)
357 * input has a value for physical, whereas 329 * input has a value for physical, whereas