Skip to contentSkip to conversation

HID: Supporting rumble in another Thrustmaster gamepad

PATCH In review rubenatch 2 participants 2 messages Jun 24, 2009

lore
Share & tools
lore

rubenatch

author
#0 lore raw

PATCH 1/1 HID: Supporting rumble in another Thrustmaster gamepad

From: Rubén Aós Garralda

This patch enables rumble in Thrustmaster Dual 3-in-1 trigger gamepads (both PC and PS3 modes). It only informs hid-tmff.c the USB IDs and force feedback modes for that gamepad, and puts the gamepad in the "forbidden" list in hid-core.c

---

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-24
18:39:41.000000000 +0200
@@ -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) },
diff -uprN linux-source-2.6.30/drivers/hid/hid-tmff.c linux-source-test/drivers/hid/hid-tmff.c
--- linux-source-2.6.30/drivers/hid/hid-tmff.c 2009-06-10 05:05:27.000000000 +0200
+++ linux-source-test/drivers/hid/hid-tmff.c 2009-06-24
18:41:04.000000000 +0200
@@ -238,6 +238,10 @@ static const struct hid_device_id tm_dev
.driver_data = (unsigned long)ff_rumble },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304),
.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 },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT
Force Feedback Wheel */

#1 lore raw

Hi Rubén,

thanks for the patch! Please find a few comments below.

Quoted 1 line · rubenatch

From: Rubén Aós Garralda

Could you please include your e-mail address here? (the one you want to have in the "author" field once the patch is committed).

Quoted 35 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-24
18:39:41.000000000 +0200

(quoted diff) +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) },
        { 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) },
diff -uprN linux-source-2.6.30/drivers/hid/hid-tmff.c linux-source-test/drivers/hid/hid-tmff.c
--- linux-source-2.6.30/drivers/hid/hid-tmff.c 2009-06-10 05:05:27.000000000 +0200
+++ linux-source-test/drivers/hid/hid-tmff.c 2009-06-24
18:41:04.000000000 +0200

(quoted diff) +1 -0
@@ -238,6 +238,10 @@ static const struct hid_device_id tm_dev
                .driver_data = (unsigned long)ff_rumble },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304),
                .driver_data = (unsigned long)ff_rumble },
+       { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323),   /* Dual

Trigger 3-in-1 (PC Mode) */

(quoted diff) +2 -0
+                .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 },

Quoted 5 lines
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651),   /* FGT

Rumble Force Wheel */
.driver_data = (unsigned long)ff_rumble },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT
Force Feedback Wheel */

The patch has been improperly wordwrapped and whitespace-damaged by your mail client. I see you are using Thunderbird -- please see the following links

	http://mbligh.org/linuxdocs/Email/Clients/Thunderbird
	http://lkml.org/lkml/2005/12/27/191

which will give you some hints about using Thunderbird for patch submissions.

Also, while you are at it, could you please resend the patch which will also update the description for CONFIG_THRUSTMASTER_FF in drivers/hid/Kconfig, adding the proper model names to the description?

Thanks a lot,

Signature · 2 lines
Jiri Kosina
SUSE Labs