Skip to contentSkip to conversation

wacom: use only one interface with DTU-2231

PATCH In review Aristeu Rozanski 1 participant 2 messages Jun 10, 2011 1 message not in the archive Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wacom: use only one interface with DTU-2231

The Wacom DTU-2231 tablet has two interfaces on its default configuration and both have HID class, leading to the creation of two input devices instead of one. Only the first one is used, so filter out the second.

index 08ba5ad..41ae3c6 100644

drivers/input/tablet/wacom_wac.c +13 -1
@@ -15,6 +15,7 @@
 #include "wacom_wac.h"
 #include "wacom.h"
 #include <linux/input/mt.h>
+#include <linux/hid.h>
 
 /* resolution for penabled devices */
 #define WACOM_PL_RES		20
@@ -1483,6 +1484,11 @@ static const struct wacom_features wacom_features_0x6004 =
 	USB_DEVICE(USB_VENDOR_ID_WACOM, prod),			\
 	.driver_info = (kernel_ulong_t)&wacom_features_##prod
 
+#define USB_DEVICE_DETAILED(prod, class, sub, proto)			\
+	USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_WACOM, prod, class, \
+				      sub, proto),			\
+	.driver_info = (kernel_ulong_t)&wacom_features_##prod
+
 #define USB_DEVICE_LENOVO(prod)					\
 	USB_DEVICE(USB_VENDOR_ID_LENOVO, prod),			\
 	.driver_info = (kernel_ulong_t)&wacom_features_##prod
@@ -1545,7 +1551,13 @@ const struct usb_device_id wacom_ids[] = {
 	{ USB_DEVICE_WACOM(0xC5) },
 	{ USB_DEVICE_WACOM(0xC6) },
 	{ USB_DEVICE_WACOM(0xC7) },
-	{ USB_DEVICE_WACOM(0xCE) },
+	/*
+	 * DTU-2231 has two interfaces on the same configuration, only one is
+ 	 * used
+ 	 */
+	{ USB_DEVICE_DETAILED(0xCE, USB_CLASS_HID,
+			      USB_INTERFACE_SUBCLASS_BOOT,
+			      USB_INTERFACE_PROTOCOL_MOUSE) },
 	{ USB_DEVICE_WACOM(0xD0) },
 	{ USB_DEVICE_WACOM(0xD1) },
 	{ USB_DEVICE_WACOM(0xD2) },

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Ping Cheng
Quoted 5 lines · Aristeu Rozanski

The Wacom DTU-2231 tablet has two interfaces on its default configuration and
both have HID class, leading to the creation of two input devices instead of one. Only the first one is used, so filter out the second.

Thank you for the patch. You forgot to put your s-o-b though.

oops :)

Signature · 1 line
Aristeu