]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/input/tablet/wacom_wac.h
Input: wacom - read 3rd gen Bamboo Touch HID data
[karo-tx-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        32
16
17 /* packet length for individual models */
18 #define WACOM_PKGLEN_PENPRTN     7
19 #define WACOM_PKGLEN_GRAPHIRE    8
20 #define WACOM_PKGLEN_BBFUN       9
21 #define WACOM_PKGLEN_INTUOS     10
22 #define WACOM_PKGLEN_TPC1FG      5
23 #define WACOM_PKGLEN_TPC2FG     14
24 #define WACOM_PKGLEN_BBTOUCH    20
25 #define WACOM_PKGLEN_BBTOUCH3   64
26
27 /* device IDs */
28 #define STYLUS_DEVICE_ID        0x02
29 #define TOUCH_DEVICE_ID         0x03
30 #define CURSOR_DEVICE_ID        0x06
31 #define ERASER_DEVICE_ID        0x0A
32 #define PAD_DEVICE_ID           0x0F
33
34 /* wacom data packet report IDs */
35 #define WACOM_REPORT_PENABLED           2
36 #define WACOM_REPORT_INTUOSREAD         5
37 #define WACOM_REPORT_INTUOSWRITE        6
38 #define WACOM_REPORT_INTUOSPAD          12
39 #define WACOM_REPORT_TPC1FG             6
40 #define WACOM_REPORT_TPC2FG             13
41
42 /* device quirks */
43 #define WACOM_QUIRK_MULTI_INPUT         0x0001
44 #define WACOM_QUIRK_BBTOUCH_LOWRES      0x0002
45
46 enum {
47         PENPARTNER = 0,
48         GRAPHIRE,
49         WACOM_G4,
50         PTU,
51         PL,
52         DTU,
53         BAMBOO_PT,
54         INTUOS,
55         INTUOS3S,
56         INTUOS3,
57         INTUOS3L,
58         INTUOS4S,
59         INTUOS4,
60         INTUOS4L,
61         WACOM_21UX2,
62         CINTIQ,
63         WACOM_BEE,
64         WACOM_MO,
65         TABLETPC,
66         TABLETPC2FG,
67         MAX_TYPE
68 };
69
70 struct wacom_features {
71         const char *name;
72         int pktlen;
73         int x_max;
74         int y_max;
75         int pressure_max;
76         int distance_max;
77         int type;
78         int x_resolution;
79         int y_resolution;
80         int device_type;
81         int x_phy;
82         int y_phy;
83         unsigned char unit;
84         unsigned char unitExpo;
85         int x_fuzz;
86         int y_fuzz;
87         int pressure_fuzz;
88         int distance_fuzz;
89         unsigned quirks;
90 };
91
92 struct wacom_shared {
93         bool stylus_in_proximity;
94         bool touch_down;
95 };
96
97 struct wacom_wac {
98         char name[64];
99         unsigned char *data;
100         int tool[2];
101         int id[2];
102         __u32 serial[2];
103         struct wacom_features features;
104         struct wacom_shared *shared;
105         struct input_dev *input;
106 };
107
108 #endif