From e33da8a5486aaadf5161118869e6cfb3d119beea Mon Sep 17 00:00:00 2001 From: Jason Childs Date: Wed, 17 Feb 2010 22:38:31 -0800 Subject: Input: wacom - use per-device instance of wacom_features Since we mangle data in wacom_features when dealing with certain devices let's use a private (per-device) instance of wacom_features in wacom_wac. This way same product ID can support more than one type of device, such as pen and touch, and not interfere with each other. Signed-off-by: Jason Childs Signed-off-by: Ping Cheng Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_wac.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/input/tablet/wacom_wac.h') diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index ee01e190278..3f4b89d51fe 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -15,11 +15,11 @@ /* packet length for individual models */ #define WACOM_PKGLEN_PENPRTN 7 #define WACOM_PKGLEN_GRAPHIRE 8 -#define WACOM_PKGLEN_BBFUN 9 -#define WACOM_PKGLEN_INTUOS 10 +#define WACOM_PKGLEN_BBFUN 9 +#define WACOM_PKGLEN_INTUOS 10 #define WACOM_PKGLEN_PENABLED 8 #define WACOM_PKGLEN_TPC1FG 5 -#define WACOM_PKGLEN_TPC2FG 14 +#define WACOM_PKGLEN_TPC2FG 14 /* device IDs */ #define STYLUS_DEVICE_ID 0x02 @@ -58,7 +58,7 @@ enum { }; struct wacom_features { - char *name; + const char *name; int pktlen; int x_max; int y_max; @@ -77,7 +77,7 @@ struct wacom_wac { int tool[2]; int id[2]; __u32 serial[2]; - struct wacom_features *features; + struct wacom_features features; }; #endif -- cgit v1.2.3 From 49b764aebde6ceea393f56cd3449bfa5720f8383 Mon Sep 17 00:00:00 2001 From: Ping Cheng Date: Sat, 20 Feb 2010 00:53:49 -0800 Subject: Input: wacom - add device type to device name string Devices supporting both pen and touch features share the same product ID, but presented as 2 separate input devices. By adding device type to device name string we can help userspace applications and users differentiate between them. 'Finger' is used for the touch since touch has been used as a suffix by userland hotplugging services. Signed-off-by: Jason Childs Signed-off-by: Ping Cheng Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_wac.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/input/tablet/wacom_wac.h') diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 3f4b89d51fe..8590b1e8ec3 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -73,10 +73,11 @@ struct wacom_features { }; struct wacom_wac { + char name[64]; unsigned char *data; - int tool[2]; - int id[2]; - __u32 serial[2]; + int tool[2]; + int id[2]; + __u32 serial[2]; struct wacom_features features; }; -- cgit v1.2.3 From 57e413d95b0f92b9a5569408ddc3441e0f20e856 Mon Sep 17 00:00:00 2001 From: Ping Cheng Date: Mon, 1 Mar 2010 23:50:24 -0800 Subject: Input: wacom - replace WACOM_PKGLEN_PENABLED Replacing WACOM_PKGLEN_PENABLED with WACOM_PKGLEN_GRAPHIRE since they both represent the same value, 8. This value will be used for both Tablet PC and Bamboo with touch devices. Signed-off-by: Ping Cheng Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_wac.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/input/tablet/wacom_wac.h') diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 8590b1e8ec3..b50cf04e61a 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -17,7 +17,6 @@ #define WACOM_PKGLEN_GRAPHIRE 8 #define WACOM_PKGLEN_BBFUN 9 #define WACOM_PKGLEN_INTUOS 10 -#define WACOM_PKGLEN_PENABLED 8 #define WACOM_PKGLEN_TPC1FG 5 #define WACOM_PKGLEN_TPC2FG 14 -- cgit v1.2.3