Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
26/* device IDs */
27#define STYLUS_DEVICE_ID 0x02
28#define TOUCH_DEVICE_ID 0x03
29#define CURSOR_DEVICE_ID 0x06
30#define ERASER_DEVICE_ID 0x0A
31#define PAD_DEVICE_ID 0x0F
32
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
41/* device quirks */
42#define WACOM_QUIRK_MULTI_INPUT 0x0001
43#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
44
45/* largest reported tracking id */
46#define MAX_TRACKING_ID 0xfff
47
48enum {
49 PENPARTNER = 0,
50 GRAPHIRE,
51 WACOM_G4,
52 PTU,
53 PL,
54 DTU,
55 BAMBOO_PT,
56 INTUOS,
57 INTUOS3S,
58 INTUOS3,
59 INTUOS3L,
60 INTUOS4S,
61 INTUOS4,
62 INTUOS4L,
63 WACOM_21UX2,
64 CINTIQ,
65 WACOM_BEE,
66 WACOM_MO,
67 TABLETPC,
68 TABLETPC2FG,
69 MAX_TYPE
70};
71
72struct wacom_features {
73 const char *name;
74 int pktlen;
75 int x_max;
76 int y_max;
77 int pressure_max;
78 int distance_max;
79 int type;
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
92struct wacom_shared {
93 bool stylus_in_proximity;
94};
95
96struct wacom_wac {
97 char name[64];
98 unsigned char *data;
99 int tool[3];
100 int id[3];
101 __u32 serial[2];
102 int last_finger;
103 int trk_id;
104 struct wacom_features features;
105 struct wacom_shared *shared;
106 struct input_dev *input;
107};
108
109#endif