HID: usbhid: Fix for the WiiU adapter from Mayflash
authorOliver Schmitt <voltumna@gmx.net>
Sat, 3 Oct 2015 16:20:02 +0000 (18:20 +0200)
committerJiri Kosina <jkosina@suse.cz>
Sun, 4 Oct 2015 21:00:59 +0000 (23:00 +0200)
The WiiU adapter from Mayflash (see
http://www.mayflash.com/Products/NINTENDOWiiU/W009.html) is not
working correctly.

The "XInput" mode works fine, the controller is recognized as a xbox
controller. But it is only possible to connect one controller with this method.

In "DInput" mode the device is recognized as some kind of mouse input but no
joystick is created. This commit will change this behavior with
HID_QUIRK_MULTI_INPUT to split the device into 4 input devices so that it will
also create joysticks in /dev/input/js*.

Signed-off-by: Oliver Schmitt <voltumna@gmx.net>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ids.h
drivers/hid/usbhid/hid-quirks.c

index f769208276ae4966dff54b1a1c6bf6aa680b84af..cfb317e664865aac98ff319c7f43bc5e1ae5083a 100644 (file)
 #define USB_DEVICE_ID_DMI_ENC          0x5fab
 
 #define USB_VENDOR_ID_DRAGONRISE       0x0079
+#define USB_DEVICE_ID_DRAGONRISE_WIIU  0x1800
 
 #define USB_VENDOR_ID_DWAV             0x0eef
 #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER   0x0001
index 1dff8f0015bac2bfd76c6946bdca8d0fdd00d73d..26d2f83308c81d541b44e79443110b2871a0b305 100644 (file)
@@ -71,6 +71,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },
        { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_009B, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103, HID_QUIRK_ALWAYS_POLL },