Skip to contentSkip to conversation

Add Force Feedback support for EMS Trio Linker Plus II

PATCH Applied Ignaz Forster 2 participants 4 messages Oct 26, 2010 – Nov 1, 2010 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add Force Feedback support for EMS Trio Linker Plus II

This patch adds Force Feedback support for the EMS Trio Linker Plus II.

The device has connections for GameCube, PlayStation 2 and Dreamcast controllers, however Force Feedback is only supported for PS2 and GC controllers.
When using a PS2 controller it may be necessary to press the "Analog" button to enable support for both motors (this behavior is identical to the Windows driver, I have found no way to avoid that).

---

drivers/hid/Kconfig +16 -0
index 3052e29..3134112 100644
@@ -150,6 +150,22 @@ config DRAGONRISE_FF
 	Say Y here if you want to enable force feedback support for DragonRise Inc.
 	game controllers.
 
+config HID_EMS
+	tristate "EMS Production Ltd. support"
+	depends on USB_HID
+	---help---
+	Say Y here if you have EMS Production Ltd. game controllers.
+
+config EMS_FF
+	bool "EMS Production Inc. force feedback support"
+	depends on HID_EMS
+	select INPUT_FF_MEMLESS
+	---help---
+	Say Y here if you want to enable force feedback support for devices by
+	EMS Production Ltd.
+	Currently the following devices are known to be supported:
+	 - Trio Linker Plus II
+
 config HID_EGALAX
 	tristate "eGalax multi-touch panel"
 	depends on USB_HID
drivers/hid/Makefile +1 -0
index c335605..7680063 100644
@@ -35,6 +35,7 @@ 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_EMS)		+= hid-emsff.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-core.c +1 -0
index 515345b..efffb78 100644
@@ -1301,6 +1301,7 @@ static const struct hid_device_id hid_blacklist[] = {
 	{ 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) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
drivers/hid/hid-emsff.c +162 -0

162 lines not on this page · raw message

drivers/hid/hid-ids.h +3 -0
index 3341baa..5175001 100644
@@ -203,6 +203,9 @@
 #define USB_VENDOR_ID_ELO		0x04E7
 #define USB_DEVICE_ID_ELO_TS2700	0x0020
 
+#define USB_VENDOR_ID_EMS		0x2006
+#define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118
+
 #define USB_VENDOR_ID_ESSENTIAL_REALITY	0x0d7f
 #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
 
Signature · 1 line
Ignaz Forster <[email protected]>
#1 lore raw
Quoted 25 lines · Ignaz Forster

This patch adds Force Feedback support for the EMS Trio Linker Plus II.

The device has connections for GameCube, PlayStation 2 and Dreamcast controllers, however Force Feedback is only supported for PS2 and GC controllers.
When using a PS2 controller it may be necessary to press the "Analog" button to enable support for both motors (this behavior is identical to the Windows driver, I have found no way to avoid that).

---

drivers/hid/Kconfig +6 -0
index 3052e29..3134112 100644
@@ -150,6 +150,22 @@ config DRAGONRISE_FF
 	Say Y here if you want to enable force feedback support for DragonRise Inc.
 	game controllers.
 
+config HID_EMS
+	tristate "EMS Production Ltd. support"
+	depends on USB_HID
+	---help---
+	Say Y here if you have EMS Production Ltd. game controllers.
+

drivers/hid/Kconfig config DRAGONRISE_FF · line 168

Quoted 10 lines
drivers/hid/Kconfig +10 -0
+config EMS_FF
+	bool "EMS Production Inc. force feedback support"
+	depends on HID_EMS
+	select INPUT_FF_MEMLESS
+	---help---
+	Say Y here if you want to enable force feedback support for devices by
+	EMS Production Ltd.
+	Currently the following devices are known to be supported:
+	 - Trio Linker Plus II
+

Why do we need both CONFIG_EMS and CONFIG_EMS_FF? There is no 'generic' EMS driver that would care for the device without FF support. So I'd say that introducing CONFIG_HID_EMS_FF solely should be enough (and build the driver only if this option is selected).

drivers/hid/hid-emsff.c

Quoted 4 lines
drivers/hid/hid-emsff.c +0 -0
index e69de29..c61b192 100644

This is a little bit odd, as your patch should be creating a new file that didn't exist before, so it should rather look like

	diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c
	new file mode 100644
	index 0000000..c61b192 100644
	--- /dev/null
	+++ b/drivers/hid/hid-emsff.c

otherise it couldn't be applied cleanly.

Apart from that, the driver looks fine, thanks for doing the work!

Could you please fix the issues mentioned above and re-send?

Thanks,

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

Jiri Kosina schrieb am 29.10.2010 14:53 Uhr:

Quoted 22 lines · Ignaz Forster
Quoted 21 lines
drivers/hid/Kconfig +13 -0
index 3052e29..3134112 100644
@@ -150,6 +150,22 @@ config DRAGONRISE_FF
 	Say Y here if you want to enable force feedback support for DragonRise Inc.
 	game controllers.
 
+config HID_EMS
+	tristate "EMS Production Ltd. support"
+	depends on USB_HID
+	---help---
+	Say Y here if you have EMS Production Ltd. game controllers.
+
+config EMS_FF
+	bool "EMS Production Inc. force feedback support"
+	depends on HID_EMS
+	select INPUT_FF_MEMLESS
+	---help---
+	Say Y here if you want to enable force feedback support for devices by
+	EMS Production Ltd.
Quoted 8 lines

drivers/hid/Kconfig config DRAGONRISE_FF · line 168

Quoted 3 lines
drivers/hid/Kconfig +3 -0
+	Currently the following devices are known to be supported:
+	 - Trio Linker Plus II
+

Why do we need both CONFIG_EMS and CONFIG_EMS_FF? There is no 'generic' EMS driver that would care for the device without FF support. So I'd say that introducing CONFIG_HID_EMS_FF solely should be enough (and build the driver only if this option is selected).

I wasn't sure about this, as for kernel 2.6.31 all memless Force Feedback devices were changed to get their own "generic" entry. Only the Acrux FF driver which was recently added in kernel 2.6.36 was requested to have a single entry again, however the other devices still have two entries.

Quoted 8 lines

drivers/hid/hid-emsff.c

Quoted 4 lines
drivers/hid/hid-emsff.c +0 -0
index e69de29..c61b192 100644

This is a little bit odd, as your patch should be creating a new file that didn't exist before, so it should rather look like

Quoted 7 lines
	diff --git a/drivers/hid/hid-emsff.c b/drivers/hid/hid-emsff.c
	new file mode 100644
	index 0000000..c61b192 100644
	--- /dev/null
	+++ b/drivers/hid/hid-emsff.c

otherise it couldn't be applied cleanly.

After several fights with git the patch below should have the problem solved...

Quoted 1 line

Apart from that, the driver looks fine, thanks for doing the work!

No problem, thanks for your interest!

Quoted 1 line

Could you please fix the issues mentioned above and re-send?

Done, see the patch below:

The device has connections for GameCube, PlayStation 2 and Dreamcast controllers, however Force Feedback is only supported for PS2 and GC controllers.
When using a PS2 controller it may be necessary to press the "Analog" button to enable support for both motors (this behavior is identical to the Windows driver, I have found no way to avoid that).

---
 drivers/hid/Kconfig     |   10 +++
 drivers/hid/Makefile    |    1 +
 drivers/hid/hid-core.c  |    1 +
 drivers/hid/hid-emsff.c |  162 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h   |    3 +
 5 files changed, 177 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-emsff.c
drivers/hid/Kconfig +10 -0
index 3052e29..3d9a95f 100644
@@ -150,6 +150,16 @@ config DRAGONRISE_FF
 	Say Y here if you want to enable force feedback support for DragonRise Inc.
 	game controllers.
 
+config HID_EMS_FF
+	tristate "EMS Production Inc. force feedback support"
+	depends on USB_HID
+	select INPUT_FF_MEMLESS
+	---help---
+	Say Y here if you want to enable force feedback support for devices by
+	EMS Production Ltd.
+	Currently the following devices are known to be supported:
+	 - Trio Linker Plus II
+
 config HID_EGALAX
 	tristate "eGalax multi-touch panel"
 	depends on USB_HID
drivers/hid/Makefile +1 -0
index c335605..86192f6 100644
@@ -35,6 +35,7 @@ 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_EMS_FF)	+= hid-emsff.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-core.c +1 -0
index 515345b..efffb78 100644
@@ -1301,6 +1301,7 @@ static const struct hid_device_id hid_blacklist[] = {
 	{ 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) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
drivers/hid/hid-emsff.c new file +162 -0

162 lines not on this page · raw message

drivers/hid/hid-ids.h +3 -0
index 3341baa..5175001 100644
@@ -203,6 +203,9 @@
 #define USB_VENDOR_ID_ELO		0x04E7
 #define USB_DEVICE_ID_ELO_TS2700	0x0020
 
+#define USB_VENDOR_ID_EMS		0x2006
+#define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118
+
 #define USB_VENDOR_ID_ESSENTIAL_REALITY	0x0d7f
 #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
 
Signature · 1 line
1.7.1
Applied
#3 lore raw
Quoted 7 lines · Ignaz Forster
Quoted 1 line

Apart from that, the driver looks fine, thanks for doing the work!

No problem, thanks for your interest!

Quoted 1 line

Could you please fix the issues mentioned above and re-send?

Done, see the patch below:

Applied, thanks.

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