Skip to contentSkip to conversation

Input: add support for DragonRise PID 0011 gamepad

PATCH Superseded Nikolai Kondrashov 2 participants 6 messages Jan 13, 2011 – Jan 21, 2011 HID

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Input: add support for DragonRise PID 0011 gamepad

These patches add support for a DragonRise Inc. gamepad with USB PID 0x0011.

The patches are made against 2.6.37. I'm almost sure it is wrong, but I wasn't able to figure out for certain which branch of which repository to use.

Please tell me which one I should use, if I'm wrong. Thanks.

Sincerely,
Nick

#1 lore raw

PATCH 1/3 Input: split hid-drff into general and ff parts

Split DragonRise Inc. HID gamepad driver (hid-drff.c) into a general (hid-dr.[hc]) and a force feedback part (hid-drff.c).

---
 drivers/hid/Makefile   |    7 ++++-
 drivers/hid/hid-dr.c   |   71 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-dr.h   |   13 +++++++++
 drivers/hid/hid-drff.c |   63 +-----------------------------------------
 4 files changed, 92 insertions(+), 62 deletions(-)
 create mode 100644 drivers/hid/hid-dr.c
 create mode 100644 drivers/hid/hid-dr.h
drivers/hid/Makefile +6 -1
index c335605..3e18fdd 100644
@@ -25,6 +25,11 @@ ifdef CONFIG_LOGIWII_FF
 	hid-logitech-objs	+= hid-lg4ff.o
 endif
 
+hid-dragonrise-objs		:= hid-dr.o
+ifdef CONFIG_DRAGONRISE_FF
+	hid-dragonrise-objs	+= hid-drff.o
+endif
+
 obj-$(CONFIG_HID_3M_PCT)	+= hid-3m-pct.o
 obj-$(CONFIG_HID_A4TECH)	+= hid-a4tech.o
 obj-$(CONFIG_HID_ACRUX_FF)	+= hid-axff.o
@@ -34,7 +39,7 @@ obj-$(CONFIG_HID_CANDO)		+= hid-cando.o
 obj-$(CONFIG_HID_CHERRY)	+= hid-cherry.o
 obj-$(CONFIG_HID_CHICONY)	+= hid-chicony.o
 obj-$(CONFIG_HID_CYPRESS)	+= hid-cypress.o
-obj-$(CONFIG_HID_DRAGONRISE)	+= hid-drff.o
+obj-$(CONFIG_HID_DRAGONRISE)	+= hid-dragonrise.o
 obj-$(CONFIG_HID_EGALAX)	+= hid-egalax.o
 obj-$(CONFIG_HID_ELECOM)	+= hid-elecom.o
 obj-$(CONFIG_HID_EZKEY)		+= hid-ezkey.o
drivers/hid/hid-dr.c new file +71 -0

71 lines not on this page · raw message

drivers/hid/hid-dr.h new file +13 -0
new file mode 100644
index 0000000..43eb631
@@ -0,0 +1,13 @@
+#ifndef __HID_DR_H
+#define __HID_DR_H
+
+#ifdef CONFIG_DRAGONRISE_FF
+extern int drff_init(struct hid_device *hid);
+#else
+static inline int drff_init(struct hid_device *hid)
+{
+	return 0;
+}
+#endif
+
+#endif
drivers/hid/hid-drff.c +2 -61

79 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 2/3 Input: add support for DragonRise PID 0011 gamepad

In reply to Nikolai Kondrashov

Add support for DragonRise Inc. gamepad with USB PID 0x0011 by fixing its report descriptor. This mainly removes spurious axis.

---
 drivers/hid/hid-core.c |    1 +
 drivers/hid/hid-dr.c   |  117 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 117 insertions(+), 1 deletions(-)
drivers/hid/hid-core.c +1 -0
index 88cb04e..bae1c09 100644
@@ -1298,6 +1298,7 @@ static const struct hid_device_id hid_blacklist[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
drivers/hid/hid-dr.c +116 -1

141 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#3 lore raw

PATCH 3/3 Input: update dragonrise Kconfig description

In reply to Nikolai Kondrashov

Add list of (supposedly) supported gamepads to dragonrise driver Kconfig description.

---
 drivers/hid/Kconfig |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/hid/Kconfig +6 -1
index 3052e29..c1c5dc0 100644
@@ -140,7 +140,12 @@ config HID_DRAGONRISE
 	tristate "DragonRise Inc. game controller"
 	depends on USB_HID
 	---help---
-	Say Y here if you have DragonRise Inc.game controllers.
+	Say Y here if you have DragonRise Inc. game controllers.
+	These might be branded as:
+	- Tesun USB-703
+	- Media-tech MT1504 "Rogue"
+	- DVTech JS19 "Gear"
+	- Defender Game Master
 
 config DRAGONRISE_FF
 	bool "DragonRise Inc. force feedback"
Signature · 1 line
1.7.2.3
#4 lore raw
In reply to Nikolai Kondrashov
Quoted 6 lines · Nikolai Kondrashov

These patches add support for a DragonRise Inc. gamepad with USB PID 0x0011.

The patches are made against 2.6.37. I'm almost sure it is wrong, but I wasn't able to figure out for certain which branch of which repository to use.

Please tell me which one I should use, if I'm wrong. Thanks.

Hi Nikolai,

two comments:

1) please always CC me on patches against drivers/hid/*, as can be guessed from MAINTAINERS file
2) please send me the patch based on more-or-less current Linus' tree, as that's what development is happening on top of.

Otherwise, the series looks fine and I am willing to apply it. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.
#5 lore raw

Hi Jiri,

Quoted 2 lines · Jiri Kosina

1) please always CC me on patches against drivers/hid/*, as can be guessed from MAINTAINERS file

I'm sorry. I'm still a bit confused about who does what.

Quoted 2 lines

2) please send me the patch based on more-or-less current Linus' tree, as that's what development is happening on top of.

Done.

Quoted 1 line

Otherwise, the series looks fine and I am willing to apply it. Thanks,

Great, thanks :)

Sincerely,
Nick