Skip to contentSkip to conversation

hid input - force feedback support for (old) Logitech RumblePad gamepad

PATCH In review Hendrik Iben 2 participants 2 messages Oct 2, 2010 – Oct 4, 2010 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hid input - force feedback support for (old) Logitech RumblePad gamepad

Hi Jiri,

I implemented a force feedback driver for an old (~year 2000, corded) Logitech RumblePad by sniffing on USB traffic. In the end I realized that it uses the same protocol that is used for the Rumblepad 2 device. So adding support was as easy as adding the new device id to the existing hid parts.
This patch was made against kernel 2.6.35 and tested on 2.6.32 and 2.6.33.
Please note that the old device is really spelled RumblePad while the new devices are called Rumblepad... I don't know anybody else with this pad to test this but as there were no code changes necessary I believe this patch should be easy to integrate.

Best regards,
Hendrik

p.s.
I hope I stick to the submitting guidelines with this...

From: Hendrik Iben <[email protected]>

This patch adds force feedback support for Logitech WingMan RumblePad gamepads by extending the Logitech Rumblepad 2 force feedback code.

---

drivers/hid/hid-core.c +1 -0
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-core.c linux-2.6.35/drivers/hid/hid-core.c
@@ -1316,6 +1316,7 @@ static const struct hid_device_id hid_bl
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2_2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_F3D) },
drivers/hid/hid-ids.h +1 -0
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-ids.h linux-2.6.35/drivers/hid/hid-ids.h
@@ -325,6 +325,7 @@
 #define USB_DEVICE_ID_LOGITECH_RECEIVER	0xc101
 #define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST  0xc110
 #define USB_DEVICE_ID_LOGITECH_HARMONY_LAST 0xc14f
+#define USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD	0xc20a
 #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD	0xc211
 #define USB_DEVICE_ID_LOGITECH_EXTREME_3D	0xc215
 #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD2	0xc218
drivers/hid/hid-lg2ff.c +2 -2
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-lg2ff.c linux-2.6.35/drivers/hid/hid-lg2ff.c
@@ -1,5 +1,5 @@
 /*
- *  Force feedback support for Logitech Rumblepad 2
+ *  Force feedback support for Logitech RumblePad and Rumblepad 2
  *
  *  Copyright (c) 2008 Anssi Hannula <[email protected]>
  */
@@ -110,7 +110,7 @@ int lg2ff_init(struct hid_device *hid)
 
 	usbhid_submit_report(hid, report, USB_DIR_OUT);
 
-	dev_info(&hid->dev, "Force feedback for Logitech Rumblepad 2 by "
+	dev_info(&hid->dev, "Force feedback for Logitech RumblePad/Rumblepad 2 by "
 	       "Anssi Hannula <[email protected]>\n");
 
 	return 0;
drivers/hid/hid-lg.c +3 -0
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-lg.c linux-2.6.35/drivers/hid/hid-lg.c
@@ -7,6 +7,7 @@
  *  Copyright (c) 2006-2007 Jiri Kosina
  *  Copyright (c) 2007 Paul Walmsley
  *  Copyright (c) 2008 Jiri Slaby
+ *  Copyright (c) 2010 Hendrik Iben
  */
 
 /*
@@ -325,6 +326,8 @@ static const struct hid_device_id lg_dev
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL),
 		.driver_data = LG_NOGET | LG_FF },
 
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD),
+		.driver_data = LG_FF2 },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD),
 		.driver_data = LG_FF },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2_2),
drivers/hid/Kconfig +2 -2
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/Kconfig linux-2.6.35/drivers/hid/Kconfig
@@ -206,12 +206,12 @@ config LOGITECH_FF
 	  force feedback.
 
 config LOGIRUMBLEPAD2_FF
-	bool "Logitech Rumblepad 2 force feedback support"
+	bool "Logitech RumblePad/Rumblepad 2 force feedback support"
 	depends on HID_LOGITECH
 	select INPUT_FF_MEMLESS
 	help
 	  Say Y here if you want to enable force feedback support for Logitech
-	  Rumblepad 2 devices.
+	  RumblePad and Rumblepad 2 devices.
 
 config LOGIG940_FF
 	bool "Logitech Flight System G940 force feedback support"
#1 lore raw
Quoted 11 lines · Hendrik Iben

Hi Jiri,

I implemented a force feedback driver for an old (~year 2000, corded) Logitech RumblePad by sniffing on USB traffic. In the end I realized that it uses the same protocol that is used for the Rumblepad 2 device. So adding support was as easy as adding the new device id to the existing hid parts. This patch was made against kernel 2.6.35 and tested on 2.6.32 and 2.6.33. Please note that the old device is really spelled RumblePad while the new devices are called Rumblepad... I don't know anybody else with this pad to test this but as there were no code changes necessary I believe this patch should be easy to integrate.

Thanks for doing the work Hendrik. I have queued the patch.

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.