mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									c7fc50aa6f
								
							
						
					
					
						commit
						fe6cc17f89
					
				
					 2 changed files with 17 additions and 5 deletions
				
			
		| 
						 | 
					@ -1887,6 +1887,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
 | 
				
			||||||
	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
 | 
				
			||||||
#if IS_ENABLED(CONFIG_HID_MAYFLASH)
 | 
					#if IS_ENABLED(CONFIG_HID_MAYFLASH)
 | 
				
			||||||
	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3) },
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3) },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR) },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1) },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2) },
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_WN) },
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_WN) },
 | 
				
			||||||
	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_FA) },
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, USB_DEVICE_ID_DREAM_CHEEKY_FA) },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,12 +6,14 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Tested with:
 | 
					 * Tested with:
 | 
				
			||||||
 * 0079:1801 "DragonRise Inc. Mayflash PS3 Game Controller Adapter"
 | 
					 * 0079:1801 "DragonRise Inc. Mayflash PS3 Game Controller Adapter"
 | 
				
			||||||
 | 
					 * 0079:1803 "DragonRise Inc. Mayflash Wireless Sensor DolphinBar"
 | 
				
			||||||
 | 
					 * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter"
 | 
				
			||||||
 | 
					 * 0079:1844 "DragonRise Inc. Mayflash GameCube Game Controller Adapter (v04)"
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The following adapters probably work too, but need to be tested:
 | 
					 * The following adapters probably work too, but need to be tested:
 | 
				
			||||||
 * 0079:1800 "DragonRise Inc. Mayflash WIIU Game Controller Adapter"
 | 
					 * 0079:1800 "DragonRise Inc. Mayflash WIIU Game Controller Adapter"
 | 
				
			||||||
 * 0079:1843 "DragonRise Inc. Mayflash GameCube Game Controller Adapter"
 | 
					 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) 2016 Marcel Hasler <mahasler@gmail.com>
 | 
					 * Copyright (c) 2016-2017 Marcel Hasler <mahasler@gmail.com>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -125,8 +127,8 @@ static int mf_probe(struct hid_device *hid, const struct hid_device_id *id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_dbg(&hid->dev, "Mayflash HID hardware probe...\n");
 | 
						dev_dbg(&hid->dev, "Mayflash HID hardware probe...\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Split device into four inputs */
 | 
						/* Apply quirks as needed */
 | 
				
			||||||
	hid->quirks |= HID_QUIRK_MULTI_INPUT;
 | 
						hid->quirks |= id->driver_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	error = hid_parse(hid);
 | 
						error = hid_parse(hid);
 | 
				
			||||||
	if (error) {
 | 
						if (error) {
 | 
				
			||||||
| 
						 | 
					@ -151,7 +153,14 @@ static int mf_probe(struct hid_device *hid, const struct hid_device_id *id)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct hid_device_id mf_devices[] = {
 | 
					static const struct hid_device_id mf_devices[] = {
 | 
				
			||||||
	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3),  },
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3),
 | 
				
			||||||
 | 
							.driver_data = HID_QUIRK_MULTI_INPUT },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR),
 | 
				
			||||||
 | 
							.driver_data = HID_QUIRK_MULTI_INPUT },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1),
 | 
				
			||||||
 | 
							.driver_data = HID_QUIRK_MULTI_INPUT },
 | 
				
			||||||
 | 
						{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE2),
 | 
				
			||||||
 | 
							.driver_data = 0 }, /* No quirk required */
 | 
				
			||||||
	{ }
 | 
						{ }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
MODULE_DEVICE_TABLE(hid, mf_devices);
 | 
					MODULE_DEVICE_TABLE(hid, mf_devices);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue