diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-20 01:18:15 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-04-14 02:24:16 -0400 |
commit | 73a97f4f6e53545b71f5c14ae2cb70a4b8d3cf63 (patch) | |
tree | 976028cc148ab1503ed3b898af07d7d2d9b6b3da /drivers/input | |
parent | 51269fe86c263ec4fafbafe82970e6d7f6f79102 (diff) |
Input: wacom - fix some formatting issues
Fix identation of switch/case statements so they follow style used by the
rest of the kernel.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 4 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 419 |
2 files changed, 222 insertions, 201 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 0e5e56cef7f..ed339e5eca8 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -99,12 +99,12 @@ static void wacom_sys_irq(struct urb *urb) | |||
99 | wcombo.wacom = wacom; | 99 | wcombo.wacom = wacom; |
100 | wcombo.urb = urb; | 100 | wcombo.urb = urb; |
101 | 101 | ||
102 | if (wacom_wac_irq(&wacom->wacom_wac, (void *)&wcombo)) | 102 | if (wacom_wac_irq(&wacom->wacom_wac, &wcombo)) |
103 | input_sync(get_input_dev(&wcombo)); | 103 | input_sync(get_input_dev(&wcombo)); |
104 | 104 | ||
105 | exit: | 105 | exit: |
106 | usb_mark_last_busy(wacom->usbdev); | 106 | usb_mark_last_busy(wacom->usbdev); |
107 | retval = usb_submit_urb (urb, GFP_ATOMIC); | 107 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
108 | if (retval) | 108 | if (retval) |
109 | err ("%s - usb_submit_urb failed with result %d", | 109 | err ("%s - usb_submit_urb failed with result %d", |
110 | __func__, retval); | 110 | __func__, retval); |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 2d7aee0bd28..4da32d0159f 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -20,36 +20,36 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom, void *wcombo) | |||
20 | unsigned char *data = wacom->data; | 20 | unsigned char *data = wacom->data; |
21 | 21 | ||
22 | switch (data[0]) { | 22 | switch (data[0]) { |
23 | case 1: | 23 | case 1: |
24 | if (data[5] & 0x80) { | 24 | if (data[5] & 0x80) { |
25 | wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; | 25 | wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; |
26 | wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID; | 26 | wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID; |
27 | wacom_report_key(wcombo, wacom->tool[0], 1); | 27 | wacom_report_key(wcombo, wacom->tool[0], 1); |
28 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); /* report tool id */ | 28 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); /* report tool id */ |
29 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); | ||
30 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); | ||
31 | wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127); | ||
32 | wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -127)); | ||
33 | wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40)); | ||
34 | } else { | ||
35 | wacom_report_key(wcombo, wacom->tool[0], 0); | ||
36 | wacom_report_abs(wcombo, ABS_MISC, 0); /* report tool id */ | ||
37 | wacom_report_abs(wcombo, ABS_PRESSURE, -1); | ||
38 | wacom_report_key(wcombo, BTN_TOUCH, 0); | ||
39 | } | ||
40 | break; | ||
41 | case 2: | ||
42 | wacom_report_key(wcombo, BTN_TOOL_PEN, 1); | ||
43 | wacom_report_abs(wcombo, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */ | ||
44 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); | 29 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); |
45 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); | 30 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); |
46 | wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127); | 31 | wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127); |
47 | wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20)); | 32 | wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -127)); |
48 | wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40)); | 33 | wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40)); |
49 | break; | 34 | } else { |
50 | default: | 35 | wacom_report_key(wcombo, wacom->tool[0], 0); |
51 | printk(KERN_INFO "wacom_penpartner_irq: received unknown report #%d\n", data[0]); | 36 | wacom_report_abs(wcombo, ABS_MISC, 0); /* report tool id */ |
52 | return 0; | 37 | wacom_report_abs(wcombo, ABS_PRESSURE, -1); |
38 | wacom_report_key(wcombo, BTN_TOUCH, 0); | ||
39 | } | ||
40 | break; | ||
41 | case 2: | ||
42 | wacom_report_key(wcombo, BTN_TOOL_PEN, 1); | ||
43 | wacom_report_abs(wcombo, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */ | ||
44 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); | ||
45 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); | ||
46 | wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127); | ||
47 | wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20)); | ||
48 | wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40)); | ||
49 | break; | ||
50 | default: | ||
51 | printk(KERN_INFO "wacom_penpartner_irq: received unknown report #%d\n", data[0]); | ||
52 | return 0; | ||
53 | } | 53 | } |
54 | return 1; | 54 | return 1; |
55 | } | 55 | } |
@@ -222,7 +222,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
222 | 222 | ||
223 | /* send pad data */ | 223 | /* send pad data */ |
224 | switch (features->type) { | 224 | switch (features->type) { |
225 | case WACOM_G4: | 225 | case WACOM_G4: |
226 | prox = data[7] & 0xf8; | 226 | prox = data[7] & 0xf8; |
227 | if (prox || wacom->id[1]) { | 227 | if (prox || wacom->id[1]) { |
228 | wacom->id[1] = PAD_DEVICE_ID; | 228 | wacom->id[1] = PAD_DEVICE_ID; |
@@ -239,7 +239,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
239 | } | 239 | } |
240 | retval = 1; | 240 | retval = 1; |
241 | break; | 241 | break; |
242 | case WACOM_MO: | 242 | |
243 | case WACOM_MO: | ||
243 | prox = (data[7] & 0xf8) || data[8]; | 244 | prox = (data[7] & 0xf8) || data[8]; |
244 | if (prox || wacom->id[1]) { | 245 | if (prox || wacom->id[1]) { |
245 | wacom->id[1] = PAD_DEVICE_ID; | 246 | wacom->id[1] = PAD_DEVICE_ID; |
@@ -279,64 +280,73 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) | |||
279 | (data[6] << 4) + (data[7] >> 4); | 280 | (data[6] << 4) + (data[7] >> 4); |
280 | 281 | ||
281 | wacom->id[idx] = (data[2] << 4) | (data[3] >> 4); | 282 | wacom->id[idx] = (data[2] << 4) | (data[3] >> 4); |
283 | |||
282 | switch (wacom->id[idx]) { | 284 | switch (wacom->id[idx]) { |
283 | case 0x812: /* Inking pen */ | 285 | case 0x812: /* Inking pen */ |
284 | case 0x801: /* Intuos3 Inking pen */ | 286 | case 0x801: /* Intuos3 Inking pen */ |
285 | case 0x20802: /* Intuos4 Classic Pen */ | 287 | case 0x20802: /* Intuos4 Classic Pen */ |
286 | case 0x012: | 288 | case 0x012: |
287 | wacom->tool[idx] = BTN_TOOL_PENCIL; | 289 | wacom->tool[idx] = BTN_TOOL_PENCIL; |
288 | break; | 290 | break; |
289 | case 0x822: /* Pen */ | 291 | |
290 | case 0x842: | 292 | case 0x822: /* Pen */ |
291 | case 0x852: | 293 | case 0x842: |
292 | case 0x823: /* Intuos3 Grip Pen */ | 294 | case 0x852: |
293 | case 0x813: /* Intuos3 Classic Pen */ | 295 | case 0x823: /* Intuos3 Grip Pen */ |
294 | case 0x885: /* Intuos3 Marker Pen */ | 296 | case 0x813: /* Intuos3 Classic Pen */ |
295 | case 0x802: /* Intuos4 Grip Pen Eraser */ | 297 | case 0x885: /* Intuos3 Marker Pen */ |
296 | case 0x804: /* Intuos4 Marker Pen */ | 298 | case 0x802: /* Intuos4 Grip Pen Eraser */ |
297 | case 0x40802: /* Intuos4 Classic Pen */ | 299 | case 0x804: /* Intuos4 Marker Pen */ |
298 | case 0x022: | 300 | case 0x40802: /* Intuos4 Classic Pen */ |
299 | wacom->tool[idx] = BTN_TOOL_PEN; | 301 | case 0x022: |
300 | break; | 302 | wacom->tool[idx] = BTN_TOOL_PEN; |
301 | case 0x832: /* Stroke pen */ | 303 | break; |
302 | case 0x032: | 304 | |
303 | wacom->tool[idx] = BTN_TOOL_BRUSH; | 305 | case 0x832: /* Stroke pen */ |
304 | break; | 306 | case 0x032: |
305 | case 0x007: /* Mouse 4D and 2D */ | 307 | wacom->tool[idx] = BTN_TOOL_BRUSH; |
306 | case 0x09c: | 308 | break; |
307 | case 0x094: | 309 | |
308 | case 0x017: /* Intuos3 2D Mouse */ | 310 | case 0x007: /* Mouse 4D and 2D */ |
309 | case 0x806: /* Intuos4 Mouse */ | 311 | case 0x09c: |
310 | wacom->tool[idx] = BTN_TOOL_MOUSE; | 312 | case 0x094: |
311 | break; | 313 | case 0x017: /* Intuos3 2D Mouse */ |
312 | case 0x096: /* Lens cursor */ | 314 | case 0x806: /* Intuos4 Mouse */ |
313 | case 0x097: /* Intuos3 Lens cursor */ | 315 | wacom->tool[idx] = BTN_TOOL_MOUSE; |
314 | case 0x006: /* Intuos4 Lens cursor */ | 316 | break; |
315 | wacom->tool[idx] = BTN_TOOL_LENS; | 317 | |
316 | break; | 318 | case 0x096: /* Lens cursor */ |
317 | case 0x82a: /* Eraser */ | 319 | case 0x097: /* Intuos3 Lens cursor */ |
318 | case 0x85a: | 320 | case 0x006: /* Intuos4 Lens cursor */ |
319 | case 0x91a: | 321 | wacom->tool[idx] = BTN_TOOL_LENS; |
320 | case 0xd1a: | 322 | break; |
321 | case 0x0fa: | 323 | |
322 | case 0x82b: /* Intuos3 Grip Pen Eraser */ | 324 | case 0x82a: /* Eraser */ |
323 | case 0x81b: /* Intuos3 Classic Pen Eraser */ | 325 | case 0x85a: |
324 | case 0x91b: /* Intuos3 Airbrush Eraser */ | 326 | case 0x91a: |
325 | case 0x80c: /* Intuos4 Marker Pen Eraser */ | 327 | case 0xd1a: |
326 | case 0x80a: /* Intuos4 Grip Pen Eraser */ | 328 | case 0x0fa: |
327 | case 0x4080a: /* Intuos4 Classic Pen Eraser */ | 329 | case 0x82b: /* Intuos3 Grip Pen Eraser */ |
328 | case 0x90a: /* Intuos4 Airbrush Eraser */ | 330 | case 0x81b: /* Intuos3 Classic Pen Eraser */ |
329 | wacom->tool[idx] = BTN_TOOL_RUBBER; | 331 | case 0x91b: /* Intuos3 Airbrush Eraser */ |
330 | break; | 332 | case 0x80c: /* Intuos4 Marker Pen Eraser */ |
331 | case 0xd12: | 333 | case 0x80a: /* Intuos4 Grip Pen Eraser */ |
332 | case 0x912: | 334 | case 0x4080a: /* Intuos4 Classic Pen Eraser */ |
333 | case 0x112: | 335 | case 0x90a: /* Intuos4 Airbrush Eraser */ |
334 | case 0x913: /* Intuos3 Airbrush */ | 336 | wacom->tool[idx] = BTN_TOOL_RUBBER; |
335 | case 0x902: /* Intuos4 Airbrush */ | 337 | break; |
336 | wacom->tool[idx] = BTN_TOOL_AIRBRUSH; | 338 | |
337 | break; | 339 | case 0xd12: |
338 | default: /* Unknown tool */ | 340 | case 0x912: |
339 | wacom->tool[idx] = BTN_TOOL_PEN; | 341 | case 0x112: |
342 | case 0x913: /* Intuos3 Airbrush */ | ||
343 | case 0x902: /* Intuos4 Airbrush */ | ||
344 | wacom->tool[idx] = BTN_TOOL_AIRBRUSH; | ||
345 | break; | ||
346 | |||
347 | default: /* Unknown tool */ | ||
348 | wacom->tool[idx] = BTN_TOOL_PEN; | ||
349 | break; | ||
340 | } | 350 | } |
341 | return 1; | 351 | return 1; |
342 | } | 352 | } |
@@ -406,7 +416,6 @@ static void wacom_intuos_general(struct wacom_wac *wacom, void *wcombo) | |||
406 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); | 416 | ((data[7] << 1) & 0x7e) | (data[8] >> 7)); |
407 | wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f); | 417 | wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f); |
408 | } | 418 | } |
409 | return; | ||
410 | } | 419 | } |
411 | 420 | ||
412 | static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | 421 | static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) |
@@ -487,7 +496,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
487 | /* process in/out prox events */ | 496 | /* process in/out prox events */ |
488 | result = wacom_intuos_inout(wacom, wcombo); | 497 | result = wacom_intuos_inout(wacom, wcombo); |
489 | if (result) | 498 | if (result) |
490 | return result-1; | 499 | return result - 1; |
491 | 500 | ||
492 | /* don't proceed if we don't know the ID */ | 501 | /* don't proceed if we don't know the ID */ |
493 | if (!wacom->id[idx]) | 502 | if (!wacom->id[idx]) |
@@ -635,44 +644,47 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo) | |||
635 | wacom->tool[1] = BTN_TOOL_TRIPLETAP; | 644 | wacom->tool[1] = BTN_TOOL_TRIPLETAP; |
636 | 645 | ||
637 | if (urb->actual_length != WACOM_PKGLEN_TPC1FG) { | 646 | if (urb->actual_length != WACOM_PKGLEN_TPC1FG) { |
647 | |||
638 | switch (data[0]) { | 648 | switch (data[0]) { |
639 | case WACOM_REPORT_TPC1FG: | ||
640 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); | ||
641 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); | ||
642 | wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); | ||
643 | wacom_report_key(wcombo, BTN_TOUCH, wacom_le16_to_cpu(&data[6])); | ||
644 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); | ||
645 | wacom_report_key(wcombo, wacom->tool[0], 1); | ||
646 | break; | ||
647 | case WACOM_REPORT_TPC2FG: | ||
648 | /* keep this byte to send proper out-prox event */ | ||
649 | wacom->id[1] = data[1] & 0x03; | ||
650 | |||
651 | if (data[1] & 0x01) { | ||
652 | wacom_tpc_finger_in(wacom, wcombo, data, 0); | ||
653 | firstFinger = 1; | ||
654 | } else if (firstFinger) { | ||
655 | wacom_tpc_touch_out(wacom, wcombo, 0); | ||
656 | } | ||
657 | 649 | ||
658 | if (data[1] & 0x02) { | 650 | case WACOM_REPORT_TPC1FG: |
659 | /* sync first finger data */ | 651 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); |
660 | if (firstFinger) | 652 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); |
661 | wacom_input_sync(wcombo); | 653 | wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); |
654 | wacom_report_key(wcombo, BTN_TOUCH, wacom_le16_to_cpu(&data[6])); | ||
655 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); | ||
656 | wacom_report_key(wcombo, wacom->tool[0], 1); | ||
657 | break; | ||
662 | 658 | ||
663 | wacom_tpc_finger_in(wacom, wcombo, data, 1); | 659 | case WACOM_REPORT_TPC2FG: |
664 | secondFinger = 1; | 660 | /* keep this byte to send proper out-prox event */ |
665 | } else if (secondFinger) { | 661 | wacom->id[1] = data[1] & 0x03; |
666 | /* sync first finger data */ | ||
667 | if (firstFinger) | ||
668 | wacom_input_sync(wcombo); | ||
669 | 662 | ||
670 | wacom_tpc_touch_out(wacom, wcombo, 1); | 663 | if (data[1] & 0x01) { |
671 | secondFinger = 0; | 664 | wacom_tpc_finger_in(wacom, wcombo, data, 0); |
672 | } | 665 | firstFinger = 1; |
673 | if (!(data[1] & 0x01)) | 666 | } else if (firstFinger) { |
674 | firstFinger = 0; | 667 | wacom_tpc_touch_out(wacom, wcombo, 0); |
675 | break; | 668 | } |
669 | |||
670 | if (data[1] & 0x02) { | ||
671 | /* sync first finger data */ | ||
672 | if (firstFinger) | ||
673 | wacom_input_sync(wcombo); | ||
674 | |||
675 | wacom_tpc_finger_in(wacom, wcombo, data, 1); | ||
676 | secondFinger = 1; | ||
677 | } else if (secondFinger) { | ||
678 | /* sync first finger data */ | ||
679 | if (firstFinger) | ||
680 | wacom_input_sync(wcombo); | ||
681 | |||
682 | wacom_tpc_touch_out(wacom, wcombo, 1); | ||
683 | secondFinger = 0; | ||
684 | } | ||
685 | if (!(data[1] & 0x01)) | ||
686 | firstFinger = 0; | ||
687 | break; | ||
676 | } | 688 | } |
677 | } else { | 689 | } else { |
678 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); | 690 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); |
@@ -681,7 +693,6 @@ static void wacom_tpc_touch_in(struct wacom_wac *wacom, void *wcombo) | |||
681 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); | 693 | wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); |
682 | wacom_report_key(wcombo, wacom->tool[0], 1); | 694 | wacom_report_key(wcombo, wacom->tool[0], 1); |
683 | } | 695 | } |
684 | return; | ||
685 | } | 696 | } |
686 | 697 | ||
687 | static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) | 698 | static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) |
@@ -769,37 +780,37 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) | |||
769 | int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) | 780 | int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) |
770 | { | 781 | { |
771 | switch (wacom_wac->features.type) { | 782 | switch (wacom_wac->features.type) { |
772 | case PENPARTNER: | 783 | case PENPARTNER: |
773 | return wacom_penpartner_irq(wacom_wac, wcombo); | 784 | return wacom_penpartner_irq(wacom_wac, wcombo); |
774 | 785 | ||
775 | case PL: | 786 | case PL: |
776 | return wacom_pl_irq(wacom_wac, wcombo); | 787 | return wacom_pl_irq(wacom_wac, wcombo); |
777 | 788 | ||
778 | case WACOM_G4: | 789 | case WACOM_G4: |
779 | case GRAPHIRE: | 790 | case GRAPHIRE: |
780 | case WACOM_MO: | 791 | case WACOM_MO: |
781 | return wacom_graphire_irq(wacom_wac, wcombo); | 792 | return wacom_graphire_irq(wacom_wac, wcombo); |
782 | 793 | ||
783 | case PTU: | 794 | case PTU: |
784 | return wacom_ptu_irq(wacom_wac, wcombo); | 795 | return wacom_ptu_irq(wacom_wac, wcombo); |
785 | 796 | ||
786 | case INTUOS: | 797 | case INTUOS: |
787 | case INTUOS3S: | 798 | case INTUOS3S: |
788 | case INTUOS3: | 799 | case INTUOS3: |
789 | case INTUOS3L: | 800 | case INTUOS3L: |
790 | case INTUOS4S: | 801 | case INTUOS4S: |
791 | case INTUOS4: | 802 | case INTUOS4: |
792 | case INTUOS4L: | 803 | case INTUOS4L: |
793 | case CINTIQ: | 804 | case CINTIQ: |
794 | case WACOM_BEE: | 805 | case WACOM_BEE: |
795 | return wacom_intuos_irq(wacom_wac, wcombo); | 806 | return wacom_intuos_irq(wacom_wac, wcombo); |
796 | 807 | ||
797 | case TABLETPC: | 808 | case TABLETPC: |
798 | case TABLETPC2FG: | 809 | case TABLETPC2FG: |
799 | return wacom_tpc_irq(wacom_wac, wcombo); | 810 | return wacom_tpc_irq(wacom_wac, wcombo); |
800 | 811 | ||
801 | default: | 812 | default: |
802 | return 0; | 813 | return 0; |
803 | } | 814 | } |
804 | return 0; | 815 | return 0; |
805 | } | 816 | } |
@@ -807,53 +818,63 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) | |||
807 | void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 818 | void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
808 | { | 819 | { |
809 | switch (wacom_wac->features.type) { | 820 | switch (wacom_wac->features.type) { |
810 | case WACOM_MO: | 821 | case WACOM_MO: |
811 | input_dev_mo(input_dev, wacom_wac); | 822 | input_dev_mo(input_dev, wacom_wac); |
812 | case WACOM_G4: | 823 | |
813 | input_dev_g4(input_dev, wacom_wac); | 824 | case WACOM_G4: |
814 | /* fall through */ | 825 | input_dev_g4(input_dev, wacom_wac); |
815 | case GRAPHIRE: | 826 | /* fall through */ |
816 | input_dev_g(input_dev, wacom_wac); | 827 | |
817 | break; | 828 | case GRAPHIRE: |
818 | case WACOM_BEE: | 829 | input_dev_g(input_dev, wacom_wac); |
819 | input_dev_bee(input_dev, wacom_wac); | 830 | break; |
820 | case INTUOS3: | 831 | |
821 | case INTUOS3L: | 832 | case WACOM_BEE: |
822 | case CINTIQ: | 833 | input_dev_bee(input_dev, wacom_wac); |
823 | input_dev_i3(input_dev, wacom_wac); | 834 | |
824 | /* fall through */ | 835 | case INTUOS3: |
825 | case INTUOS3S: | 836 | case INTUOS3L: |
826 | input_dev_i3s(input_dev, wacom_wac); | 837 | case CINTIQ: |
827 | /* fall through */ | 838 | input_dev_i3(input_dev, wacom_wac); |
828 | case INTUOS: | 839 | /* fall through */ |
829 | input_dev_i(input_dev, wacom_wac); | 840 | |
830 | break; | 841 | case INTUOS3S: |
831 | case INTUOS4: | 842 | input_dev_i3s(input_dev, wacom_wac); |
832 | case INTUOS4L: | 843 | /* fall through */ |
833 | input_dev_i4(input_dev, wacom_wac); | 844 | |
834 | /* fall through */ | 845 | case INTUOS: |
835 | case INTUOS4S: | 846 | input_dev_i(input_dev, wacom_wac); |
836 | input_dev_i4s(input_dev, wacom_wac); | 847 | break; |
837 | input_dev_i(input_dev, wacom_wac); | 848 | |
838 | break; | 849 | case INTUOS4: |
839 | case TABLETPC2FG: | 850 | case INTUOS4L: |
840 | input_dev_tpc2fg(input_dev, wacom_wac); | 851 | input_dev_i4(input_dev, wacom_wac); |
841 | /* fall through */ | 852 | /* fall through */ |
842 | case TABLETPC: | 853 | |
843 | input_dev_tpc(input_dev, wacom_wac); | 854 | case INTUOS4S: |
844 | if (wacom_wac->features.device_type != BTN_TOOL_PEN) | 855 | input_dev_i4s(input_dev, wacom_wac); |
845 | break; /* no need to process stylus stuff */ | 856 | input_dev_i(input_dev, wacom_wac); |
846 | 857 | break; | |
847 | /* fall through */ | 858 | |
848 | case PL: | 859 | case TABLETPC2FG: |
849 | case PTU: | 860 | input_dev_tpc2fg(input_dev, wacom_wac); |
850 | input_dev_pl(input_dev, wacom_wac); | 861 | /* fall through */ |
851 | /* fall through */ | 862 | |
852 | case PENPARTNER: | 863 | case TABLETPC: |
853 | input_dev_pt(input_dev, wacom_wac); | 864 | input_dev_tpc(input_dev, wacom_wac); |
854 | break; | 865 | if (wacom_wac->features.device_type != BTN_TOOL_PEN) |
866 | break; /* no need to process stylus stuff */ | ||
867 | /* fall through */ | ||
868 | |||
869 | case PL: | ||
870 | case PTU: | ||
871 | input_dev_pl(input_dev, wacom_wac); | ||
872 | /* fall through */ | ||
873 | |||
874 | case PENPARTNER: | ||
875 | input_dev_pt(input_dev, wacom_wac); | ||
876 | break; | ||
855 | } | 877 | } |
856 | return; | ||
857 | } | 878 | } |
858 | 879 | ||
859 | static const struct wacom_features wacom_features_0x00 = | 880 | static const struct wacom_features wacom_features_0x00 = |