Although the kernel modifies the PID of devices connected to the system
through Wacom's Wireless Accessory Kit to match that of the actual
tablet, it does not look like udev is aware of this change and instead
matches on the VID/PID of the kit's dongle. To ensure devices connected
this way are properly tagged, add general-purpose matches for the kit.

Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
---
 tools/generate-udev-rules.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..8a73c9f 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -63,6 +63,22 @@ static void print_huion_quirk (void)
        printf ("\n");
 }
 
+static void print_wireless_kit_quirk (void)
+{
+       /* Bamboo and Intuos devices connected to the system via Wacom's
+        * Wireless Accessory Kit appear to udev as having the PID of the
+        * dongle rather than the actual tablet. Make sure we properly tag
+        * such devices.
+        */
+       char *match = "ENV{ID_BUS}==\"usb\", ENV{ID_VENDOR_ID}==\"056a\", 
ENV{ID_MODEL_ID}==\"0084\"";
+
+       printf("# Wacom Wireless Accessory Kit\n");
+       printf("%s, ENV{ID_INPUT}=\"1\", ENV{ID_INPUT_JOYSTICK}=\"\", 
ENV{ID_INPUT_TABLET}=\"1\"\n", match);
+       printf("ATTRS{name}==\"* Finger\", %s,  
ENV{ID_INPUT_TOUCHPAD}=\"1\"\n", match);
+       printf("ATTRS{name}==\"* Pad\", %s,  ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", 
match);
+       printf("\n");
+}
+
 static char * generate_device_match(WacomDevice *device, const WacomMatch 
*match)
 {
        WacomBusType type       = libwacom_match_get_bustype (match);
@@ -220,6 +236,7 @@ int main(int argc, char **argv)
 
        print_udev_header ();
        print_huion_quirk ();
+       print_wireless_kit_quirk ();
        for (p = list; *p; p++)
                print_udev_entry ((WacomDevice *) *p, WBUSTYPE_USB);
 
-- 
2.8.3


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to