Skip to contentSkip to conversation

hid: add force feedback support for SmartJoy PLUS PS2/USB adapter

PATCH New Jussi Kivilinna 1 participant 1 message May 13, 2009 HID

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hid: add force feedback support for SmartJoy PLUS PS2/USB adapter

This driver adds force feedback support for SmartJoy PLUS PS2/USB adapter. I made this driver one device spesific instead of making generic 'wisegroup-ff' because I have another Wisegroup PS2/USB adapter that doesn't work same way as SmartJoy PLUS. If another device that is compatible pops up, this driver could be then renamed to something more generic.

v2 changes:
- use pr_fmt
- remove #ifdef from hid-core.c and made driver unable-to-disable if !EMBEDDED

---

 drivers/hid/Kconfig    |   15 ++++
 drivers/hid/Makefile   |    1 
 drivers/hid/hid-core.c |    1 
 drivers/hid/hid-ids.h  |    1 
 drivers/hid/hid-sjoy.c |  182 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 200 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-sjoy.c
drivers/hid/Kconfig +15 -0
index 7e67dcb..939c305 100644
@@ -256,6 +256,21 @@ config GREENASIA_FF
 	(like MANTA Warrior MM816 and SpeedLink Strike2 SL-6635) or adapter
 	and want to enable force feedback support for it.
 
+config HID_SMARTJOYPLUS
+	tristate "SmartJoy PLUS PS2/USB adapter support" if EMBEDDED
+	depends on USB_HID
+	default !EMBEDDED
+	---help---
+	Support for SmartJoy PLUS PS2/USB adapter.
+
+config SMARTJOYPLUS_FF
+	bool "SmartJoy PLUS PS2/USB adapter force feedback support"
+	depends on HID_SMARTJOYPLUS
+	select INPUT_FF_MEMLESS
+	---help---
+	Say Y here if you have a SmartJoy PLUS PS2/USB adapter and want to
+	enable force feedback support for it.
+
 config HID_TOPSEED
 	tristate "TopSeed Cyberlink remote control support" if EMBEDDED
 	depends on USB_HID
drivers/hid/Makefile +1 -0
index 1f7cb0f..2ba82ce 100644
@@ -34,6 +34,7 @@ obj-$(CONFIG_HID_NTRIG)		+= hid-ntrig.o
 obj-$(CONFIG_HID_PANTHERLORD)	+= hid-pl.o
 obj-$(CONFIG_HID_PETALYNX)	+= hid-petalynx.o
 obj-$(CONFIG_HID_SAMSUNG)	+= hid-samsung.o
+obj-$(CONFIG_HID_SMARTJOYPLUS)	+= hid-sjoy.o
 obj-$(CONFIG_HID_SONY)		+= hid-sony.o
 obj-$(CONFIG_HID_SUNPLUS)	+= hid-sunplus.o
 obj-$(CONFIG_GREENASIA_FF)	+= hid-gaff.o
drivers/hid/hid-core.c +1 -0
index 8551693..b485ac2 100644
@@ -1312,6 +1312,7 @@ static const struct hid_device_id hid_blacklist[] = {
 	{ 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) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
 
drivers/hid/hid-ids.h +1 -0
index 4d5ee2b..faf20c5 100644
@@ -416,6 +416,7 @@
 #define USB_VENDOR_ID_WACOM		0x056a
 
 #define USB_VENDOR_ID_WISEGROUP		0x0925
+#define USB_DEVICE_ID_SMARTJOY_PLUS	0x0005
 #define USB_DEVICE_ID_1_PHIDGETSERVO_20	0x8101
 #define USB_DEVICE_ID_4_PHIDGETSERVO_20	0x8104
 #define USB_DEVICE_ID_8_8_4_IF_KIT	0x8201
drivers/hid/hid-sjoy.c new file +182 -0

182 lines not on this page · raw message