Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: hid-mf: add force feedback support for Mayflash DolphinBar and GameCube

The Mayflash DolphinBar and GameCube adapters have been tested and confirmed to
work using the hid-mf driver.

Signed-off-by: Marcel Hasler <mahasler@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Marcel Hasler and committed by
Jiri Kosina
fe6cc17f c7fc50aa

+17 -5
+3
drivers/hid/hid-core.c
··· 1887 1887 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) }, 1888 1888 #if IS_ENABLED(CONFIG_HID_MAYFLASH) 1889 1889 { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3) }, 1890 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR) }, 1891 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1) }, 1892 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2) }, 1890 1893 #endif 1891 1894 { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_WN) }, 1892 1895 { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_FA) },
+14 -5
drivers/hid/hid-mf.c
··· 6 6 * 7 7 * Tested with: 8 8 * 0079:1801 "DragonRise Inc. Mayflash PS3 Game Controller Adapter" 9 + * 0079:1803 "DragonRise Inc. Mayflash Wireless Sensor DolphinBar" 10 + * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter" 11 + * 0079:1844 "DragonRise Inc. Mayflash GameCube Game Controller Adapter (v04)" 9 12 * 10 13 * The following adapters probably work too, but need to be tested: 11 14 * 0079:1800 "DragonRise Inc. Mayflash WIIU Game Controller Adapter" 12 - * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter" 13 15 * 14 - * Copyright (c) 2016 Marcel Hasler <mahasler@gmail.com> 16 + * Copyright (c) 2016-2017 Marcel Hasler <mahasler@gmail.com> 15 17 */ 16 18 17 19 /* ··· 127 125 128 126 dev_dbg(&hid->dev, "Mayflash HID hardware probe...\n"); 129 127 130 - /* Split device into four inputs */ 131 - hid->quirks |= HID_QUIRK_MULTI_INPUT; 128 + /* Apply quirks as needed */ 129 + hid->quirks |= id->driver_data; 132 130 133 131 error = hid_parse(hid); 134 132 if (error) { ··· 153 151 } 154 152 155 153 static const struct hid_device_id mf_devices[] = { 156 - { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), }, 154 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3), 155 + .driver_data = HID_QUIRK_MULTI_INPUT }, 156 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR), 157 + .driver_data = HID_QUIRK_MULTI_INPUT }, 158 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1), 159 + .driver_data = HID_QUIRK_MULTI_INPUT }, 160 + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2), 161 + .driver_data = 0 }, /* No quirk required */ 157 162 { } 158 163 }; 159 164 MODULE_DEVICE_TABLE(hid, mf_devices);