Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: use hid-plff driver for GreenAsia 0e8f:0003 devices

Add 0e8f:0003 into the list of devices supported by the hid-plff
force feedback driver. These devices identify themselves as
"GreenAsia Inc. USB Joystick " and can be either adapters or
actual game controllers. The testing was done with a Köng Gaming
gamepad.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Anssi Hannula and committed by
Jiri Kosina
5edc41ee d500d116

+22 -11
+3 -3
drivers/hid/usbhid/Kconfig
··· 71 71 force feedback. 72 72 73 73 config PANTHERLORD_FF 74 - bool "PantherLord USB/PS2 2in1 Adapter support" 74 + bool "PantherLord/GreenAsia based device support" 75 75 depends on HID_FF 76 76 select INPUT_FF_MEMLESS if USB_HID 77 77 help 78 - Say Y here if you have a PantherLord USB/PS2 2in1 Adapter and want 79 - to enable force feedback support for it. 78 + Say Y here if you have a PantherLord/GreenAsia based game controller 79 + or adapter and want to enable force feedback support for it. 80 80 81 81 config THRUSTMASTER_FF 82 82 bool "ThrustMaster devices support (EXPERIMENTAL)"
+2 -1
drivers/hid/usbhid/hid-ff.c
··· 62 62 { 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */ 63 63 #endif 64 64 #ifdef CONFIG_PANTHERLORD_FF 65 - { 0x810, 0x0001, hid_plff_init }, 65 + { 0x810, 0x0001, hid_plff_init }, /* "Twin USB Joystick" */ 66 + { 0xe8f, 0x0003, hid_plff_init }, /* "GreenAsia Inc. USB Joystick " */ 66 67 #endif 67 68 #ifdef CONFIG_THRUSTMASTER_FF 68 69 { 0x44f, 0xb300, hid_tmff_init },
+17 -7
drivers/hid/usbhid/hid-plff.c
··· 1 1 /* 2 - * Force feedback support for PantherLord USB/PS2 2in1 Adapter devices 2 + * Force feedback support for PantherLord/GreenAsia based devices 3 + * 4 + * The devices are distributed under various names and the same USB device ID 5 + * can be used in both adapters and actual game controllers. 6 + * 7 + * 0810:0001 "Twin USB Joystick" 8 + * - tested with PantherLord USB/PS2 2in1 Adapter 9 + * - contains two reports, one for each port (HID_QUIRK_MULTI_INPUT) 10 + * 11 + * 0e8f:0003 "GreenAsia Inc. USB Joystick " 12 + * - tested with Köng Gaming gamepad 3 13 * 4 14 * Copyright (c) 2007 Anssi Hannula <anssi.hannula@gmail.com> 5 15 */ ··· 77 67 struct input_dev *dev; 78 68 int error; 79 69 80 - /* The device contains 2 output reports (one for each 81 - HID_QUIRK_MULTI_INPUT device), both containing 1 field, which 82 - contains 4 ff00.0002 usages and 4 16bit absolute values. 70 + /* The device contains one output report per physical device, all 71 + containing 1 field, which contains 4 ff00.0002 usages and 4 16bit 72 + absolute values. 83 73 84 - The 2 input reports also contain a field which contains 74 + The input reports also contain a field which contains 85 75 8 ff00.0001 usages and 8 boolean values. Their meaning is 86 76 currently unknown. */ 87 77 ··· 132 122 usbhid_submit_report(hid, plff->report, USB_DIR_OUT); 133 123 } 134 124 135 - printk(KERN_INFO "hid-plff: Force feedback for PantherLord USB/PS2 " 136 - "2in1 Adapters by Anssi Hannula <anssi.hannula@gmail.com>\n"); 125 + printk(KERN_INFO "hid-plff: Force feedback for PantherLord/GreenAsia " 126 + "devices by Anssi Hannula <anssi.hannula@gmail.com>\n"); 137 127 138 128 return 0; 139 129 }