Input: wacom - add reporting of SW_MUTE_DEVICE events
[deliverable/linux.git] / drivers / input / tablet / wacom_wac.h
1 /*
2 * drivers/input/tablet/wacom_wac.h
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
12 #include <linux/types.h>
13
14 /* maximum packet length for USB devices */
15 #define WACOM_PKGLEN_MAX 64
16
17 #define WACOM_NAME_MAX 64
18
19 /* packet length for individual models */
20 #define WACOM_PKGLEN_PENPRTN 7
21 #define WACOM_PKGLEN_GRAPHIRE 8
22 #define WACOM_PKGLEN_BBFUN 9
23 #define WACOM_PKGLEN_INTUOS 10
24 #define WACOM_PKGLEN_TPC1FG 5
25 #define WACOM_PKGLEN_TPC2FG 14
26 #define WACOM_PKGLEN_BBTOUCH 20
27 #define WACOM_PKGLEN_BBTOUCH3 64
28 #define WACOM_PKGLEN_BBPEN 10
29 #define WACOM_PKGLEN_WIRELESS 32
30 #define WACOM_PKGLEN_MTOUCH 62
31 #define WACOM_PKGLEN_MTTPC 40
32
33 /* wacom data size per MT contact */
34 #define WACOM_BYTES_PER_MT_PACKET 11
35 #define WACOM_BYTES_PER_24HDT_PACKET 14
36
37 /* device IDs */
38 #define STYLUS_DEVICE_ID 0x02
39 #define TOUCH_DEVICE_ID 0x03
40 #define CURSOR_DEVICE_ID 0x06
41 #define ERASER_DEVICE_ID 0x0A
42 #define PAD_DEVICE_ID 0x0F
43
44 /* wacom data packet report IDs */
45 #define WACOM_REPORT_PENABLED 2
46 #define WACOM_REPORT_INTUOSREAD 5
47 #define WACOM_REPORT_INTUOSWRITE 6
48 #define WACOM_REPORT_INTUOSPAD 12
49 #define WACOM_REPORT_INTUOS5PAD 3
50 #define WACOM_REPORT_TPC1FG 6
51 #define WACOM_REPORT_TPC2FG 13
52 #define WACOM_REPORT_TPCMT 13
53 #define WACOM_REPORT_TPCHID 15
54 #define WACOM_REPORT_TPCST 16
55 #define WACOM_REPORT_TPC1FGE 18
56 #define WACOM_REPORT_24HDT 1
57 #define WACOM_REPORT_WL 128
58 #define WACOM_REPORT_USB 192
59
60 /* device quirks */
61 #define WACOM_QUIRK_MULTI_INPUT 0x0001
62 #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
63 #define WACOM_QUIRK_NO_INPUT 0x0004
64 #define WACOM_QUIRK_MONITOR 0x0008
65
66 enum {
67 PENPARTNER = 0,
68 GRAPHIRE,
69 WACOM_G4,
70 PTU,
71 PL,
72 DTU,
73 INTUOS,
74 INTUOS3S,
75 INTUOS3,
76 INTUOS3L,
77 INTUOS4S,
78 INTUOS4,
79 INTUOS4L,
80 INTUOS5S,
81 INTUOS5,
82 INTUOS5L,
83 INTUOSPS,
84 INTUOSPM,
85 INTUOSPL,
86 INTUOSHT,
87 WACOM_21UX2,
88 WACOM_22HD,
89 DTK,
90 WACOM_24HD,
91 CINTIQ_HYBRID,
92 CINTIQ,
93 WACOM_BEE,
94 WACOM_13HD,
95 WACOM_MO,
96 WIRELESS,
97 BAMBOO_PT,
98 WACOM_24HDT,
99 TABLETPC, /* add new TPC below */
100 TABLETPCE,
101 TABLETPC2FG,
102 MTSCREEN,
103 MTTPC,
104 MAX_TYPE
105 };
106
107 struct wacom_features {
108 const char *name;
109 int pktlen;
110 int x_max;
111 int y_max;
112 int pressure_max;
113 int distance_max;
114 int type;
115 int x_resolution;
116 int y_resolution;
117 int device_type;
118 int x_phy;
119 int y_phy;
120 unsigned char unit;
121 unsigned char unitExpo;
122 int x_fuzz;
123 int y_fuzz;
124 int pressure_fuzz;
125 int distance_fuzz;
126 unsigned quirks;
127 unsigned touch_max;
128 int oVid;
129 int oPid;
130 };
131
132 struct wacom_shared {
133 bool stylus_in_proximity;
134 bool touch_down;
135 /* for wireless device to access USB interfaces */
136 unsigned touch_max;
137 int type;
138 struct input_dev *touch_input;
139 };
140
141 struct wacom_wac {
142 char name[WACOM_NAME_MAX];
143 unsigned char *data;
144 int tool[2];
145 int id[2];
146 __u32 serial[2];
147 struct wacom_features features;
148 struct wacom_shared *shared;
149 struct input_dev *input;
150 int pid;
151 int battery_capacity;
152 int num_contacts_left;
153 };
154
155 #endif
This page took 0.034268 seconds and 5 git commands to generate.