All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Support more Mayflash game contoller adapters.
@ 2017-01-07 11:09 Marcel Hasler
  2017-01-07 11:10 ` [PATCH 1/2] hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter Marcel Hasler
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marcel Hasler @ 2017-01-07 11:09 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, Robert de Rooy

This patchset improves support for the Mayflash DolphinBar and GameCube adapters. These have been tested by Robert de Rooy and confirmed to work correctly using the following patches. See Bugzilla entry 115841 (https://bugzilla.kernel.org/show_bug.cgi?id=115841) for more information.

Marcel Hasler (2):
  hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter.
  hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters.

 drivers/hid/hid-core.c          |  3 +++
 drivers/hid/hid-ids.h           |  3 ++-
 drivers/hid/hid-mf.c            | 19 ++++++++++++++-----
 drivers/hid/usbhid/hid-quirks.c |  2 +-
 4 files changed, 20 insertions(+), 7 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter.
  2017-01-07 11:09 [PATCH 0/2] Support more Mayflash game contoller adapters Marcel Hasler
@ 2017-01-07 11:10 ` Marcel Hasler
  2017-01-07 11:11 ` [PATCH 2/2] hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters Marcel Hasler
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marcel Hasler @ 2017-01-07 11:10 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input

The Mayflash GameCube adapter has received a firmware update which, among other things, changes the device's PID. It also fixes enumeration, therefore the updated firmware no longer requires HID_QUIRK_MULTI_INPUT.

Signed-off-by: Marcel Hasler <mahasler@gmail.com>
---
 drivers/hid/hid-ids.h           | 3 ++-
 drivers/hid/usbhid/hid-quirks.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 54bd22dc1411..23cb33c36663 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -320,7 +320,8 @@
 #define USB_DEVICE_ID_DRAGONRISE_WIIU		0x1800
 #define USB_DEVICE_ID_DRAGONRISE_PS3		0x1801
 #define USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR	0x1803
-#define USB_DEVICE_ID_DRAGONRISE_GAMECUBE	0x1843
+#define USB_DEVICE_ID_DRAGONRISE_GAMECUBE1	0x1843
+#define USB_DEVICE_ID_DRAGONRISE_GAMECUBE2	0x1844
 
 #define USB_VENDOR_ID_DWAV		0x0eef
 #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER	0x0001
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index e9d6cc7cdfc5..54b641efd939 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -84,7 +84,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_PS3, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_DOLPHINBAR, HID_QUIRK_MULTI_INPUT },
-	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE, HID_QUIRK_MULTI_INPUT },
+	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_GAMECUBE1, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL },
 	{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS },
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters.
  2017-01-07 11:09 [PATCH 0/2] Support more Mayflash game contoller adapters Marcel Hasler
  2017-01-07 11:10 ` [PATCH 1/2] hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter Marcel Hasler
@ 2017-01-07 11:11 ` Marcel Hasler
  2017-01-10  8:52 ` [PATCH 0/2] Support more Mayflash game contoller adapters Benjamin Tissoires
  2017-01-11 21:13 ` Jiri Kosina
  3 siblings, 0 replies; 5+ messages in thread
From: Marcel Hasler @ 2017-01-07 11:11 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input

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>
---
 drivers/hid/hid-core.c |  3 +++
 drivers/hid/hid-mf.c   | 19 ++++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index cff060b56da9..54e98ff7090d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1887,6 +1887,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
 #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_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
 	{ 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) },
diff --git a/drivers/hid/hid-mf.c b/drivers/hid/hid-mf.c
index d9090765a6e5..03f10516131d 100644
--- a/drivers/hid/hid-mf.c
+++ b/drivers/hid/hid-mf.c
@@ -6,12 +6,14 @@
  *
  * Tested with:
  * 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:
  * 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");
 
-	/* Split device into four inputs */
-	hid->quirks |= HID_QUIRK_MULTI_INPUT;
+	/* Apply quirks as needed */
+	hid->quirks |= id->driver_data;
 
 	error = hid_parse(hid);
 	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[] = {
-	{ 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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Support more Mayflash game contoller adapters.
  2017-01-07 11:09 [PATCH 0/2] Support more Mayflash game contoller adapters Marcel Hasler
  2017-01-07 11:10 ` [PATCH 1/2] hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter Marcel Hasler
  2017-01-07 11:11 ` [PATCH 2/2] hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters Marcel Hasler
@ 2017-01-10  8:52 ` Benjamin Tissoires
  2017-01-11 21:13 ` Jiri Kosina
  3 siblings, 0 replies; 5+ messages in thread
From: Benjamin Tissoires @ 2017-01-10  8:52 UTC (permalink / raw)
  To: Marcel Hasler; +Cc: Jiri Kosina, linux-input, Robert de Rooy

On Jan 07 2017 or thereabouts, Marcel Hasler wrote:
> This patchset improves support for the Mayflash DolphinBar and GameCube adapters. These have been tested by Robert de Rooy and confirmed to work correctly using the following patches. See Bugzilla entry 115841 (https://bugzilla.kernel.org/show_bug.cgi?id=115841) for more information.
> 
> Marcel Hasler (2):
>   hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter.
>   hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters.

The series looks good to me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

> 
>  drivers/hid/hid-core.c          |  3 +++
>  drivers/hid/hid-ids.h           |  3 ++-
>  drivers/hid/hid-mf.c            | 19 ++++++++++++++-----
>  drivers/hid/usbhid/hid-quirks.c |  2 +-
>  4 files changed, 20 insertions(+), 7 deletions(-)
> 
> -- 
> 2.11.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Support more Mayflash game contoller adapters.
  2017-01-07 11:09 [PATCH 0/2] Support more Mayflash game contoller adapters Marcel Hasler
                   ` (2 preceding siblings ...)
  2017-01-10  8:52 ` [PATCH 0/2] Support more Mayflash game contoller adapters Benjamin Tissoires
@ 2017-01-11 21:13 ` Jiri Kosina
  3 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2017-01-11 21:13 UTC (permalink / raw)
  To: Marcel Hasler; +Cc: Benjamin Tissoires, linux-input, Robert de Rooy

On Sat, 7 Jan 2017, Marcel Hasler wrote:

> This patchset improves support for the Mayflash DolphinBar and GameCube adapters. These have been tested by Robert de Rooy and confirmed to work correctly using the following patches. See Bugzilla entry 115841 (https://bugzilla.kernel.org/show_bug.cgi?id=115841) for more information.
> 
> Marcel Hasler (2):
>   hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter.
>   hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters.
> 
>  drivers/hid/hid-core.c          |  3 +++
>  drivers/hid/hid-ids.h           |  3 ++-
>  drivers/hid/hid-mf.c            | 19 ++++++++++++++-----
>  drivers/hid/usbhid/hid-quirks.c |  2 +-
>  4 files changed, 20 insertions(+), 7 deletions(-)

Applied to for-4.11/mayflash, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-11 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 11:09 [PATCH 0/2] Support more Mayflash game contoller adapters Marcel Hasler
2017-01-07 11:10 ` [PATCH 1/2] hid: Add a new device ID for updated Mayflash/Dragonrise GameCube adapter Marcel Hasler
2017-01-07 11:11 ` [PATCH 2/2] hid-mf: Add force feedback support for Mayflash DolphinBar and GameCube adapters Marcel Hasler
2017-01-10  8:52 ` [PATCH 0/2] Support more Mayflash game contoller adapters Benjamin Tissoires
2017-01-11 21:13 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.