input: DragonRise Inc. game controller force feedback support
PATCH 1/1 input: DragonRise Inc. game controller force feedback support
Adds force feedback support for USB DragonRise Inc. game controllers. These devices are mass produced in China and distributed under several vendors.
---
drivers/hid/hid-core.c +1 -0
@@ -1262,6 +1262,7 @@ static const struct hid_device_id hid_bl { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, { 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_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-drff.c +193 -0
193 lines not on this page · raw message
drivers/hid/hid-dummy.c +3 -0
@@ -28,6 +28,9 @@ static int __init hid_dummy_init(void)#ifdef CONFIG_HID_DELL_MODULE HID_COMPAT_CALL_DRIVER (dell);#endif +#ifdef CONFIG_DRAGONRISE_FF_MODULE +HID_COMPAT_CALL_DRIVER (dragonrise); +#endif #ifdef CONFIG_HID_EZKEY_MODULE HID_COMPAT_CALL_DRIVER (ezkey);#endif
drivers/hid/hid-ids.h +2 -0
@@ -148,6 +148,8 @@#define USB_VENDOR_ID_DMI 0x0c0b#define USB_DEVICE_ID_DMI_ENC 0x5fab +#define USB_VENDOR_ID_DRAGONRISE 0x0079 +#define USB_VENDOR_ID_ELO 0x04E7#define USB_DEVICE_ID_ELO_TS2700 0x0020
drivers/hid/Kconfig +8 -0
@@ -128,6 +128,14 @@ config HID_CYPRESS ---help--- Support for cypress mouse and barcode readers. +config DRAGONRISE_FF + tristate "DragonRise 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 DragonRise Inc. + game controllers. + config HID_EZKEY tristate "Ezkey" if EMBEDDED depends on USB_HID
drivers/hid/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_HID_BELKIN) += hid-belkin.o obj-$(CONFIG_HID_CHERRY) += hid-cherry.o obj-$(CONFIG_HID_CHICONY) += hid-chicony.o obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o +obj-$(CONFIG_DRAGONRISE_FF) += hid-drff.o obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o obj-$(CONFIG_HID_GYRATION) += hid-gyration.o obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
Hi Richard,
Quoted 3 lines · Richard Walmsley
Adds force feedback support for USB DragonRise Inc. game controllers. These devices are mass produced in China and distributed under several vendors.
Looks pretty good, however it shoudl go through Jiri Kosina (CCed).
drivers/hid/hid-drff.c line 89
Quoted 7 lines
drivers/hid/hid-drff.c +7
-0+ +static int drff_init (struct hid_device *hid) +{ +struct drff_device *drff; +struct hid_report *report; +struct hid_input *hidinput =list_entry (hid->inputs.next, + struct hid_input, list);
list_first_entry()?
Quoted 4 lines
drivers/hid/hid-drff.c +4
-0+struct list_head *report_list = + &hid->report_enum[HID_OUTPUT_REPORT ].report_list; +struct list_head *report_ptr = report_list; +struct input_dev *dev = hidinput->input;
drivers/hid/hid-drff.c line 103
Quoted 10 lines
drivers/hid/hid-drff.c +10
-0+int error; + +if (list_empty (report_list)) { +dev_err (&hid->dev,"no output reports found\n" ); +return -ENODEV ; + } + + report_ptr = report_ptr->next; + + report = list_entry(report_ptr, struct hid_report, list);
You might want to simply use list_first_entry() for this.
Signature · 1 line
Dmitry
Whoops. Sorry about that. I'll send it to the correct maintainer.
Quoted 36 lines · Dmitry Torokhov
Hi Richard,
Quoted 3 lines · Richard Walmsley
Adds force feedback support for USB DragonRise Inc. game controllers. These devices are mass produced in China and distributed under several vendors.
Looks pretty good, however it shoudl go through Jiri Kosina (CCed).
drivers/hid/hid-drff.c line 89
Quoted 7 lines
drivers/hid/hid-drff.c +7
-0+ +static int drff_init (struct hid_device *hid) +{ + struct drff_device *drff; + struct hid_report *report; + struct hid_input *hidinput = list_entry(hid->inputs.next, + struct hid_input, list);
list_first_entry()?Quoted 5 lines
+ struct
list_head*report_list=
+ &hid->report_enum[HID_OUTPUT_REPORT].report_list;
+ structlist_head*report_ptr=report_list;
+ structinput_dev*dev =hidinput->input;
+ int error;drivers/hid/hid-drff.c line 103
Quoted 9 lines
drivers/hid/hid-drff.c +9
-0+ + if (list_empty(report_list)) { + dev_err(&hid->dev, "no output reports found\n"); + return -ENODEV; + } + + report_ptr = report_ptr->next; + + report = list_entry(report_ptr, struct hid_report, list);You might want to simply use
list_first_entry()for this.
Quoted 3 lines
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html