summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_wac.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-07-24 12:48:28 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-25 18:53:46 -0700
commitd2d13f18aaa51af070c7b6f20606d5cfdb7e87c1 (patch)
treef70adf9beca587ed536a95565fe6cc186c2f8b29 /drivers/input/tablet/wacom_wac.h
parent7097d4cb597d1d9fe5296082cc3f191db44ab349 (diff)
Input: wacom - create a separate input device for pads
Currently, the pad events are sent through the stylus input device for the Intuos/Cintiqs, and through the touch input device for the Bamboos. To differentiate the buttons pressed on the pad from the ones pressed on the stylus, the Intuos/Cintiq uses MISC_SERIAL and ABS_MISC. This lead to a multiplexing of the events into one device, which are then splitted out in xf86-input-wacom. Bamboos are not using MISC events because the pad is attached to the touch interface, and only BTN_TOUCH is used for the finger (and DOUBLE_TAP, etc...). However, the user space driver still splits out the pad from the touch interface in the same way it does for the pro line devices. The other problem we can see with this fact is that some of the Intuos and Cintiq have a wheel, and the effective range of the reported values is [0..71]. Unfortunately, the airbrush stylus also sends wheel events (there is a small wheel on it), but in the range [0..1023]. From the user space point of view it is kind of difficult to understand that because the wheel on the pad are quite common, while the airbrush tool is not. A solution to fix all of these problems is to split out the pad device from the stylus/touch. This decision makes more sense because the pad is not linked to the absolute position of the finger or pen, and usually, the events from the pad are filtered out by the compositor, which then convert them into actions or keyboard shortcuts. For backward compatibility with current xf86-input-wacom, the pad devices still present the ABS_X, ABS_Y and ABS_MISC events, but they can be completely ignored in the new implementation. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet/wacom_wac.h')
-rw-r--r--drivers/input/tablet/wacom_wac.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index b2c9a9c1b55..f48164c780f 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -150,6 +150,7 @@ struct wacom_shared {
struct wacom_wac {
char name[WACOM_NAME_MAX];
+ char pad_name[WACOM_NAME_MAX];
unsigned char *data;
int tool[2];
int id[2];
@@ -157,6 +158,7 @@ struct wacom_wac {
struct wacom_features features;
struct wacom_shared *shared;
struct input_dev *input;
+ struct input_dev *pad_input;
int pid;
int battery_capacity;
int num_contacts_left;