Commit | Line | Data |
---|---|---|
3bea733a | 1 | /* |
4104d13f | 2 | * drivers/input/tablet/wacom_wac.h |
3bea733a PC |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | */ | |
9 | #ifndef WACOM_WAC_H | |
10 | #define WACOM_WAC_H | |
11 | ||
51269fe8 DT |
12 | #include <linux/types.h> |
13 | ||
ee54500d PC |
14 | /* maximum packet length for USB devices */ |
15 | #define WACOM_PKGLEN_MAX 32 | |
16 | ||
17 | /* packet length for individual models */ | |
18 | #define WACOM_PKGLEN_PENPRTN 7 | |
19 | #define WACOM_PKGLEN_GRAPHIRE 8 | |
e33da8a5 JC |
20 | #define WACOM_PKGLEN_BBFUN 9 |
21 | #define WACOM_PKGLEN_INTUOS 10 | |
ee54500d | 22 | #define WACOM_PKGLEN_TPC1FG 5 |
e33da8a5 | 23 | #define WACOM_PKGLEN_TPC2FG 14 |
4a88081e | 24 | #define WACOM_PKGLEN_BBTOUCH 20 |
ee54500d | 25 | |
ec67bbed | 26 | /* device IDs */ |
3bea733a | 27 | #define STYLUS_DEVICE_ID 0x02 |
545f4e99 | 28 | #define TOUCH_DEVICE_ID 0x03 |
3bea733a PC |
29 | #define CURSOR_DEVICE_ID 0x06 |
30 | #define ERASER_DEVICE_ID 0x0A | |
80d4e8e9 | 31 | #define PAD_DEVICE_ID 0x0F |
3bea733a | 32 | |
cad74700 PC |
33 | /* wacom data packet report IDs */ |
34 | #define WACOM_REPORT_PENABLED 2 | |
35 | #define WACOM_REPORT_INTUOSREAD 5 | |
36 | #define WACOM_REPORT_INTUOSWRITE 6 | |
37 | #define WACOM_REPORT_INTUOSPAD 12 | |
38 | #define WACOM_REPORT_TPC1FG 6 | |
39 | #define WACOM_REPORT_TPC2FG 13 | |
40 | ||
bc73dd39 HR |
41 | /* device quirks */ |
42 | #define WACOM_QUIRK_MULTI_INPUT 0x0001 | |
f4ccbef2 | 43 | #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002 |
bc73dd39 | 44 | |
cb734c03 HR |
45 | /* largest reported tracking id */ |
46 | #define MAX_TRACKING_ID 0xfff | |
47 | ||
3bea733a PC |
48 | enum { |
49 | PENPARTNER = 0, | |
50 | GRAPHIRE, | |
51 | WACOM_G4, | |
52 | PTU, | |
53 | PL, | |
c8f2edc5 | 54 | DTU, |
4a88081e | 55 | BAMBOO_PT, |
3bea733a | 56 | INTUOS, |
8d32e3ae | 57 | INTUOS3S, |
3bea733a PC |
58 | INTUOS3, |
59 | INTUOS3L, | |
6f660f12 PC |
60 | INTUOS4S, |
61 | INTUOS4, | |
62 | INTUOS4L, | |
3a4b4aaa | 63 | WACOM_21UX2, |
3bea733a | 64 | CINTIQ, |
0e1763f5 | 65 | WACOM_BEE, |
7ecfbfd3 | 66 | WACOM_MO, |
545f4e99 | 67 | TABLETPC, |
ec67bbed | 68 | TABLETPC2FG, |
3bea733a PC |
69 | MAX_TYPE |
70 | }; | |
71 | ||
72 | struct wacom_features { | |
e33da8a5 | 73 | const char *name; |
3bea733a PC |
74 | int pktlen; |
75 | int x_max; | |
76 | int y_max; | |
77 | int pressure_max; | |
78 | int distance_max; | |
79 | int type; | |
ec67bbed PC |
80 | int device_type; |
81 | int x_phy; | |
82 | int y_phy; | |
83 | unsigned char unit; | |
84 | unsigned char unitExpo; | |
fed87e65 HR |
85 | int x_fuzz; |
86 | int y_fuzz; | |
87 | int pressure_fuzz; | |
88 | int distance_fuzz; | |
bc73dd39 | 89 | unsigned quirks; |
3bea733a PC |
90 | }; |
91 | ||
4492efff PC |
92 | struct wacom_shared { |
93 | bool stylus_in_proximity; | |
94 | }; | |
95 | ||
3bea733a | 96 | struct wacom_wac { |
49b764ae | 97 | char name[64]; |
4ee1fc8e | 98 | unsigned char *data; |
ab687b18 PC |
99 | int tool[3]; |
100 | int id[3]; | |
49b764ae | 101 | __u32 serial[2]; |
ab687b18 | 102 | int last_finger; |
cb734c03 | 103 | int trk_id; |
e33da8a5 | 104 | struct wacom_features features; |
4492efff | 105 | struct wacom_shared *shared; |
8da23fc1 | 106 | struct input_dev *input; |
3bea733a PC |
107 | }; |
108 | ||
109 | #endif |