aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_sys.c
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2012-04-03 18:50:40 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-04 12:25:42 -0400
commitae584ca473289377dd7fd8c61439db4bfab5489a (patch)
tree844fa2f4aac8de7ddc72066247f7a3c04eec6443 /drivers/input/tablet/wacom_sys.c
parent9b5b95dd516a13d53ecf9217672d2116f05097bc (diff)
Input: wacom - add Intuos5 multitouch sensor support
Intuos5 tablets with PTH-* model numbers include a multitouch sensor which use the same touch reports as the 3rd-generation Bamboo. No useful information is in the HID descriptor for the touch interface so hardcoded values are used during setup. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r--drivers/input/tablet/wacom_sys.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index d7713388a953..1c874adb7053 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -233,6 +233,9 @@ static int wacom_parse_logical_collection(unsigned char *report,
233 * 3rd gen Bamboo Touch no longer define a Digitizer-Finger Pysical 233 * 3rd gen Bamboo Touch no longer define a Digitizer-Finger Pysical
234 * Collection. Instead they define a Logical Collection with a single 234 * Collection. Instead they define a Logical Collection with a single
235 * Logical Maximum for both X and Y. 235 * Logical Maximum for both X and Y.
236 *
237 * Intuos5 touch interface does not contain useful data. We deal with
238 * this after returning from this function.
236 */ 239 */
237static int wacom_parse_hid(struct usb_interface *intf, 240static int wacom_parse_hid(struct usb_interface *intf,
238 struct hid_descriptor *hid_desc, 241 struct hid_descriptor *hid_desc,
@@ -1085,6 +1088,28 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
1085 if (error) 1088 if (error)
1086 goto fail3; 1089 goto fail3;
1087 1090
1091 /*
1092 * Intuos5 has no useful data about its touch interface in its
1093 * HID descriptor. If this is the touch interface (wMaxPacketSize
1094 * of WACOM_PKGLEN_BBTOUCH3), override the table values.
1095 */
1096 if (features->type >= INTUOS5S && features->type <= INTUOS5L) {
1097 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
1098 features->device_type = BTN_TOOL_FINGER;
1099 features->pktlen = WACOM_PKGLEN_BBTOUCH3;
1100
1101 features->x_phy =
1102 (features->x_max * 100) / features->x_resolution;
1103 features->y_phy =
1104 (features->y_max * 100) / features->y_resolution;
1105
1106 features->x_max = 4096;
1107 features->y_max = 4096;
1108 } else {
1109 features->device_type = BTN_TOOL_PEN;
1110 }
1111 }
1112
1088 wacom_setup_device_quirks(features); 1113 wacom_setup_device_quirks(features);
1089 1114
1090 strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name)); 1115 strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name));