Skip to contentSkip to conversation

Adding rumble support to Thrustmaster Dual Trigger 3-in-1 devices

PATCH Superseded [email protected] 2 participants 2 messages Jun 26, 2009 – Jun 28, 2009 HID

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Adding rumble support to Thrustmaster Dual Trigger 3-in-1 devices

From: Rubén Aós Garralda <[email protected]>

This patch enables rumble in Thrustmaster Dual 3-in-1 trigger gamepads (in
both PC and PS3 modes). It uses the same code as Thrustmaster FireStorm Dual Power 2/3, so it only modifies hid-core.c (to put the devices in the "forbidden list" and hid-tmff.c to add the new USB IDs.

---

Latest patch was BAAAAAD (it had a missing end of comment), please discard. New patch:

drivers/hid/hid-core.c +2 -0
diff -uprN linux-source-2.6.30/drivers/hid/hid-core.c linux-source-test/drivers/hid/hid-core.c
@@ -1309,6 +1309,8 @@ static const struct hid_device_id hid_bl
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
+       	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
drivers/hid/hid-tmff.c +5 -1
diff -uprN linux-source-2.6.30/drivers/hid/hid-tmff.c linux-source-test/drivers/hid/hid-tmff.c
@@ -236,7 +236,11 @@ err:
 static const struct hid_device_id tm_devices[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300),
 		.driver_data = (unsigned long)ff_rumble },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304),
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304),	/* FireStorm Dual Power 2 (and 3) */
+		.driver_data = (unsigned long)ff_rumble },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323),	/* Dual Trigger 3-in-1 (PC Mode) */
+		.driver_data = (unsigned long)ff_rumble },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324),	/* Dual Trigger 3-in-1 (PS3 Mode) */
 		.driver_data = (unsigned long)ff_rumble },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651),	/* FGT Rumble Force Wheel */
 		.driver_data = (unsigned long)ff_rumble },
drivers/hid/Kconfig +3 -2
diff -uprN linux-source-2.6.30/drivers/hid/Kconfig linux-source-test/drivers/hid/Kconfig
@@ -268,8 +268,9 @@ config THRUSTMASTER_FF
 	depends on USB_HID
 	select INPUT_FF_MEMLESS
 	help
-	  Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
-	  a THRUSTMASTER Ferrari GT Rumble Force or Force Feedback Wheel.
+	  Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or 3,
+	  a THRUSTMASTER Dual Trigger 3-in-1 or a THRUSTMASTER Ferrari GT
+	  Rumble Force or Force Feedback Wheel.
 
 config ZEROPLUS_FF
 	tristate "Zeroplus based game controller support"
#1 lore raw
Quoted 7 lines · On Fri, 26 Jun 2009, [email protected] wrote:

From: Rubén Aós Garralda <[email protected]>

This patch enables rumble in Thrustmaster Dual 3-in-1 trigger gamepads (in both PC and PS3 modes). It uses the same code as Thrustmaster FireStorm Dual Power 2/3, so it only modifies hid-core.c (to put the devices in the "forbidden list" and hid-tmff.c to add the new USB IDs.

Could you please also send your Signed-off-by: line, so that I can properly merge the patch?

drivers/hid/hid-core.c static const struct hid_device_id hid_bl · line 1314

Quoted 13 lines

diff -uprN linux-source-2.6.30/drivers/hid/hid-core.c linux-source-test/drivers/hid/hid-core.c
--- linux-source-2.6.30/drivers/hid/hid-core.c 2009-06-10 05:05:27.000000000
+0200
+++ linux-source-test/drivers/hid/hid-core.c 2009-06-26 15:33:48.000000000
+0200

drivers/hid/hid-core.c +2 -0
@@ -1309,6 +1309,8 @@ static const struct hid_device_id hid_bl
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS,
 	USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
+       	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },

This is whitespace damaged.

Otherwise the patch is OK.

Thanks!

Signature · 2 lines
Jiri Kosina
SUSE Labs