diff options
-rw-r--r-- | drivers/input/tablet/wacom.h | 1 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 128 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 11 |
3 files changed, 76 insertions, 64 deletions
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h index e6307ba452ea..d71da970602c 100644 --- a/drivers/input/tablet/wacom.h +++ b/drivers/input/tablet/wacom.h | |||
@@ -70,6 +70,7 @@ | |||
70 | * v1.50 (pc) - Fixed a TabletPC touch bug in 2.6.28 | 70 | * v1.50 (pc) - Fixed a TabletPC touch bug in 2.6.28 |
71 | * v1.51 (pc) - Added support for Intuos4 | 71 | * v1.51 (pc) - Added support for Intuos4 |
72 | * v1.52 (pc) - Query Wacom data upon system resume | 72 | * v1.52 (pc) - Query Wacom data upon system resume |
73 | * - add defines for features->type | ||
73 | */ | 74 | */ |
74 | 75 | ||
75 | /* | 76 | /* |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index c896d6a21b7e..d5fc97d36102 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/input/tablet/wacom_wac.c | 2 | * drivers/input/tablet/wacom_wac.c |
3 | * | 3 | * |
4 | * USB Wacom Graphire and Wacom Intuos tablet support - Wacom specific code | 4 | * USB Wacom tablet support - Wacom specific code |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
@@ -617,8 +617,8 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) | |||
617 | 617 | ||
618 | dbg("wacom_tpc_irq: received report #%d", data[0]); | 618 | dbg("wacom_tpc_irq: received report #%d", data[0]); |
619 | 619 | ||
620 | if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */ | 620 | if (urb->actual_length == WACOM_PKGLEN_TPC1FG || data[0] == 6) { /* Touch data */ |
621 | if (urb->actual_length == 5) { /* with touch */ | 621 | if (urb->actual_length == WACOM_PKGLEN_TPC1FG) { /* with touch */ |
622 | prox = data[0] & 0x03; | 622 | prox = data[0] & 0x03; |
623 | } else { /* with capacity */ | 623 | } else { /* with capacity */ |
624 | prox = data[1] & 0x03; | 624 | prox = data[1] & 0x03; |
@@ -629,7 +629,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) | |||
629 | if (touchInProx) { | 629 | if (touchInProx) { |
630 | wacom->tool[1] = BTN_TOOL_DOUBLETAP; | 630 | wacom->tool[1] = BTN_TOOL_DOUBLETAP; |
631 | wacom->id[0] = TOUCH_DEVICE_ID; | 631 | wacom->id[0] = TOUCH_DEVICE_ID; |
632 | if (urb->actual_length != 5) { | 632 | if (urb->actual_length != WACOM_PKGLEN_TPC1FG) { |
633 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); | 633 | wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); |
634 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); | 634 | wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); |
635 | wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); | 635 | wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); |
@@ -804,66 +804,66 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w | |||
804 | } | 804 | } |
805 | 805 | ||
806 | static struct wacom_features wacom_features[] = { | 806 | static struct wacom_features wacom_features[] = { |
807 | { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER }, | 807 | { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, 0, PENPARTNER }, |
808 | { "Wacom Graphire", 8, 10206, 7422, 511, 63, GRAPHIRE }, | 808 | { "Wacom Graphire", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }, |
809 | { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 63, GRAPHIRE }, | 809 | { "Wacom Graphire2 4x5", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }, |
810 | { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 63, GRAPHIRE }, | 810 | { "Wacom Graphire2 5x7", WACOM_PKGLEN_GRAPHIRE, 13918, 10206, 511, 63, GRAPHIRE }, |
811 | { "Wacom Graphire3", 8, 10208, 7424, 511, 63, GRAPHIRE }, | 811 | { "Wacom Graphire3", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, GRAPHIRE }, |
812 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, | 812 | { "Wacom Graphire3 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }, |
813 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, | 813 | { "Wacom Graphire4 4x5", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, WACOM_G4 }, |
814 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, | 814 | { "Wacom Graphire4 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, WACOM_G4 }, |
815 | { "Wacom BambooFun 4x5", 9, 14760, 9225, 511, 63, WACOM_MO }, | 815 | { "Wacom BambooFun 4x5", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }, |
816 | { "Wacom BambooFun 6x8", 9, 21648, 13530, 511, 63, WACOM_MO }, | 816 | { "Wacom BambooFun 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 511, 63, WACOM_MO }, |
817 | { "Wacom Bamboo1 Medium",8, 16704, 12064, 511, 63, GRAPHIRE }, | 817 | { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }, |
818 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 818 | { "Wacom Volito", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }, |
819 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, | 819 | { "Wacom PenStation2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 255, 63, GRAPHIRE }, |
820 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 820 | { "Wacom Volito2 4x5", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }, |
821 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, | 821 | { "Wacom Volito2 2x3", WACOM_PKGLEN_GRAPHIRE, 3248, 2320, 511, 63, GRAPHIRE }, |
822 | { "Wacom PenPartner2", 8, 3250, 2320, 511, 63, GRAPHIRE }, | 822 | { "Wacom PenPartner2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 511, 63, GRAPHIRE }, |
823 | { "Wacom Bamboo", 9, 14760, 9225, 511, 63, WACOM_MO }, | 823 | { "Wacom Bamboo", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }, |
824 | { "Wacom Bamboo1", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 824 | { "Wacom Bamboo1", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }, |
825 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, | 825 | { "Wacom Intuos 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }, |
826 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 826 | { "Wacom Intuos 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }, |
827 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, | 827 | { "Wacom Intuos 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }, |
828 | { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 31, INTUOS }, | 828 | { "Wacom Intuos 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }, |
829 | { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 31, INTUOS }, | 829 | { "Wacom Intuos 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }, |
830 | { "Wacom PL400", 8, 5408, 4056, 255, 0, PL }, | 830 | { "Wacom PL400", WACOM_PKGLEN_GRAPHIRE, 5408, 4056, 255, 0, PL }, |
831 | { "Wacom PL500", 8, 6144, 4608, 255, 0, PL }, | 831 | { "Wacom PL500", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 255, 0, PL }, |
832 | { "Wacom PL600", 8, 6126, 4604, 255, 0, PL }, | 832 | { "Wacom PL600", WACOM_PKGLEN_GRAPHIRE, 6126, 4604, 255, 0, PL }, |
833 | { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL }, | 833 | { "Wacom PL600SX", WACOM_PKGLEN_GRAPHIRE, 6260, 5016, 255, 0, PL }, |
834 | { "Wacom PL550", 8, 6144, 4608, 511, 0, PL }, | 834 | { "Wacom PL550", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 511, 0, PL }, |
835 | { "Wacom PL800", 8, 7220, 5780, 511, 0, PL }, | 835 | { "Wacom PL800", WACOM_PKGLEN_GRAPHIRE, 7220, 5780, 511, 0, PL }, |
836 | { "Wacom PL700", 8, 6758, 5406, 511, 0, PL }, | 836 | { "Wacom PL700", WACOM_PKGLEN_GRAPHIRE, 6758, 5406, 511, 0, PL }, |
837 | { "Wacom PL510", 8, 6282, 4762, 511, 0, PL }, | 837 | { "Wacom PL510", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }, |
838 | { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL }, | 838 | { "Wacom DTU710", WACOM_PKGLEN_GRAPHIRE, 34080, 27660, 511, 0, PL }, |
839 | { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL }, | 839 | { "Wacom DTF521", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }, |
840 | { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL }, | 840 | { "Wacom DTF720", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }, |
841 | { "Wacom DTF720a", 8, 6858, 5506, 511, 0, PL }, | 841 | { "Wacom DTF720a", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }, |
842 | { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU }, | 842 | { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE, 20480, 15360, 511, 0, PTU }, |
843 | { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, | 843 | { "Wacom Intuos2 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }, |
844 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 844 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }, |
845 | { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, | 845 | { "Wacom Intuos2 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }, |
846 | { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 31, INTUOS }, | 846 | { "Wacom Intuos2 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }, |
847 | { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 31, INTUOS }, | 847 | { "Wacom Intuos2 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }, |
848 | { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 63, INTUOS3S }, | 848 | { "Wacom Intuos3 4x5", WACOM_PKGLEN_INTUOS, 25400, 20320, 1023, 63, INTUOS3S }, |
849 | { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 63, INTUOS3 }, | 849 | { "Wacom Intuos3 6x8", WACOM_PKGLEN_INTUOS, 40640, 30480, 1023, 63, INTUOS3 }, |
850 | { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 63, INTUOS3 }, | 850 | { "Wacom Intuos3 9x12", WACOM_PKGLEN_INTUOS, 60960, 45720, 1023, 63, INTUOS3 }, |
851 | { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L }, | 851 | { "Wacom Intuos3 12x12", WACOM_PKGLEN_INTUOS, 60960, 60960, 1023, 63, INTUOS3L }, |
852 | { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L }, | 852 | { "Wacom Intuos3 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 1023, 63, INTUOS3L }, |
853 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, | 853 | { "Wacom Intuos3 6x11", WACOM_PKGLEN_INTUOS, 54204, 31750, 1023, 63, INTUOS3 }, |
854 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, | 854 | { "Wacom Intuos3 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 1023, 63, INTUOS3S }, |
855 | { "Wacom Intuos4 4x6", 10, 31496, 19685, 2047, 63, INTUOS4S }, | 855 | { "Wacom Intuos4 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047, 63, INTUOS4S }, |
856 | { "Wacom Intuos4 6x9", 10, 44704, 27940, 2047, 63, INTUOS4 }, | 856 | { "Wacom Intuos4 6x9", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, 63, INTUOS4 }, |
857 | { "Wacom Intuos4 8x13", 10, 65024, 40640, 2047, 63, INTUOS4L }, | 857 | { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }, |
858 | { "Wacom Intuos4 12x19", 10, 97536, 60960, 2047, 63, INTUOS4L }, | 858 | { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }, |
859 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, | 859 | { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }, |
860 | { "Wacom Cintiq 20WSX", 10, 86680, 54180, 1023, 63, WACOM_BEE }, | 860 | { "Wacom Cintiq 20WSX", WACOM_PKGLEN_INTUOS, 86680, 54180, 1023, 63, WACOM_BEE }, |
861 | { "Wacom Cintiq 12WX", 10, 53020, 33440, 1023, 63, WACOM_BEE }, | 861 | { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }, |
862 | { "Wacom DTU1931", 8, 37832, 30305, 511, 0, PL }, | 862 | { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }, |
863 | { "Wacom ISDv4 90", 8, 26202, 16325, 255, 0, TABLETPC }, | 863 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }, |
864 | { "Wacom ISDv4 93", 8, 26202, 16325, 255, 0, TABLETPC }, | 864 | { "Wacom ISDv4 93", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }, |
865 | { "Wacom ISDv4 9A", 8, 26202, 16325, 255, 0, TABLETPC }, | 865 | { "Wacom ISDv4 9A", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }, |
866 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 866 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }, |
867 | { } | 867 | { } |
868 | }; | 868 | }; |
869 | 869 | ||
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index c10235aba7e5..1bfe9a3bae93 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -9,6 +9,17 @@ | |||
9 | #ifndef WACOM_WAC_H | 9 | #ifndef WACOM_WAC_H |
10 | #define WACOM_WAC_H | 10 | #define WACOM_WAC_H |
11 | 11 | ||
12 | /* maximum packet length for USB devices */ | ||
13 | #define WACOM_PKGLEN_MAX 32 | ||
14 | |||
15 | /* packet length for individual models */ | ||
16 | #define WACOM_PKGLEN_PENPRTN 7 | ||
17 | #define WACOM_PKGLEN_GRAPHIRE 8 | ||
18 | #define WACOM_PKGLEN_BBFUN 9 | ||
19 | #define WACOM_PKGLEN_INTUOS 10 | ||
20 | #define WACOM_PKGLEN_PENABLED 8 | ||
21 | #define WACOM_PKGLEN_TPC1FG 5 | ||
22 | |||
12 | #define STYLUS_DEVICE_ID 0x02 | 23 | #define STYLUS_DEVICE_ID 0x02 |
13 | #define TOUCH_DEVICE_ID 0x03 | 24 | #define TOUCH_DEVICE_ID 0x03 |
14 | #define CURSOR_DEVICE_ID 0x06 | 25 | #define CURSOR_DEVICE_ID 0x06 |