Skip to contentSkip to conversation

Input: add support for DragonRise PID 0011 gamepad

PATCH Superseded Nikolai Kondrashov 3 participants 7 messages Jan 21, 2011 – Jan 24, 2011 HID

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: add support for DragonRise PID 0011 gamepad

These three patches add support for DragonRise Inc. USB PID 0x0011 gamepad. This version is rebased onto recent state of Linus' master (namely 12fcdba).

 drivers/hid/Kconfig    |    7 ++-
 drivers/hid/Makefile   |    7 ++-
 drivers/hid/hid-core.c |    1 +
 drivers/hid/hid-dr.c   |  186 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-dr.h   |   13 ++++
 drivers/hid/hid-drff.c |   63 +----------------
 6 files changed, 214 insertions(+), 63 deletions(-)

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 6efc2a0..ea58795 100644
@@ -25,6 +25,11 @@ ifdef CONFIG_LOGIWII_FF
 	hid-logitech-y	+= 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_EMS_FF)	+= hid-emsff.o
 obj-$(CONFIG_HID_EGALAX)	+= hid-egalax.o
 obj-$(CONFIG_HID_ELECOM)	+= hid-elecom.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

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

Quoted 18 lines · Nikolai Kondrashov

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 +0 -0
index 6efc2a0..ea58795 100644

drivers/hid/Makefile ifdef CONFIG_LOGIWII_FF · line 31

Quoted 7 lines
drivers/hid/Makefile +4 -0
@@ -25,6 +25,11 @@ ifdef CONFIG_LOGIWII_FF
 	hid-logitech-y	+= hid-lg4ff.o
 endif
 
+hid-dragonrise-objs		:= hid-dr.o
+ifdef CONFIG_DRAGONRISE_FF
+	hid-dragonrise-objs	+= hid-drff.o
+endif

If you want to keep the 2 source files then I think you should write this as:

hid-dragonrise-y := hid-dr.o
hid-dragonrise-$(CONFIG_DRAGONRISE_FF) += hid-drff.o

Or maybe fold them into one?

Signature · 1 line
Dmitry
#3 lore raw

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

Quoted 28 lines · Dmitry Torokhov
Quoted 18 lines

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 +0 -0
index 6efc2a0..ea58795 100644

drivers/hid/Makefile ifdef CONFIG_LOGIWII_FF · line 31

Quoted 7 lines
drivers/hid/Makefile +4 -0
@@ -25,6 +25,11 @@ ifdef CONFIG_LOGIWII_FF
 	hid-logitech-y	+= hid-lg4ff.o
 endif
 
+hid-dragonrise-objs		:= hid-dr.o
+ifdef CONFIG_DRAGONRISE_FF
+	hid-dragonrise-objs	+= hid-drff.o
+endif

If you want to keep the 2 source files then I think you should write this as:

Quoted 4 lines

hid-dragonrise-y := hid-dr.o
hid-dragonrise-$(CONFIG_DRAGONRISE_FF) += hid-drff.o

Or maybe fold them into one?

Yeah, folding into one looks sane to me.

Nikolai, could you please respin the patches and resend? Otherwise I have no objections.

Thanks,

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

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

Quoted 7 lines · Jiri Kosina
Quoted 1 line · Dmitry Torokhov

Or maybe fold them into one?

Yeah, folding into one looks sane to me.

Nikolai, could you please respin the patches and resend? Otherwise I have no objections.

Sure, that was my original idea, but I thought this way it would be less diruptive.

Yet, I'll still have to read about Kbuild makefiles to understand completely what Dmitry was talking about :)

Sincerely,
Nick

#5 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 d678cf3..75af1f8 100644
@@ -1328,6 +1328,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) },
 	{ 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_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) },
drivers/hid/hid-dr.c +116 -1

141 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#6 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 24cca2f..98600e5 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