diff options
author | Anssi Hannula <anssi.hannula@gmail.com> | 2007-01-11 09:51:17 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-02-05 04:00:04 -0500 |
commit | 5556feae1c4e1cf2021b5fb2ef99973125de2250 (patch) | |
tree | e63b32662f951018a6bc306911a0764904194798 /drivers | |
parent | c4146067fd7889bc6fab6cdfd8b2795d745a2156 (diff) |
hid: quirk for multi-input devices with unneeded output reports
Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports
when enumerating reports on a hid-input device. Add this quirk and
HID_QUIRK_MULTI_INPUT to 0810:0001.
PantherLord Twin USB Joystick, 0810:0001 has separate input reports
for 2 distinct game controllers in the same interface, so it needs
HID_QUIRK_MULTI_INPUT. However, the device also contains one output
report per controller which is used to control the force feedback
function, and we do not want those to appear as separate input
devices as well. The simplest approach seems to be to add a quirk to
skip output reports on 0810:0001, and allow the force feedback
driver to handle those.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-input.c | 6 | ||||
-rw-r--r-- | drivers/usb/input/hid-core.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index c7a6833f6821..33b1126f5e5d 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -816,6 +816,7 @@ int hidinput_connect(struct hid_device *hid) | |||
816 | struct hid_input *hidinput = NULL; | 816 | struct hid_input *hidinput = NULL; |
817 | struct input_dev *input_dev; | 817 | struct input_dev *input_dev; |
818 | int i, j, k; | 818 | int i, j, k; |
819 | int max_report_type = HID_OUTPUT_REPORT; | ||
819 | 820 | ||
820 | INIT_LIST_HEAD(&hid->inputs); | 821 | INIT_LIST_HEAD(&hid->inputs); |
821 | 822 | ||
@@ -828,7 +829,10 @@ int hidinput_connect(struct hid_device *hid) | |||
828 | if (i == hid->maxcollection) | 829 | if (i == hid->maxcollection) |
829 | return -1; | 830 | return -1; |
830 | 831 | ||
831 | for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) | 832 | if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS) |
833 | max_report_type = HID_INPUT_REPORT; | ||
834 | |||
835 | for (k = HID_INPUT_REPORT; k <= max_report_type; k++) | ||
832 | list_for_each_entry(report, &hid->report_enum[k].report_list, list) { | 836 | list_for_each_entry(report, &hid->report_enum[k].report_list, list) { |
833 | 837 | ||
834 | if (!report->maxfield) | 838 | if (!report->maxfield) |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 2971182bbdf6..1fa42f400176 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -792,6 +792,9 @@ void usbhid_init_reports(struct hid_device *hid) | |||
792 | #define USB_VENDOR_ID_IMATION 0x0718 | 792 | #define USB_VENDOR_ID_IMATION 0x0718 |
793 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 | 793 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 |
794 | 794 | ||
795 | #define USB_VENDOR_ID_PANTHERLORD 0x0810 | ||
796 | #define USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK 0x0001 | ||
797 | |||
795 | /* | 798 | /* |
796 | * Alphabetically sorted blacklist by quirk type. | 799 | * Alphabetically sorted blacklist by quirk type. |
797 | */ | 800 | */ |
@@ -969,6 +972,8 @@ static const struct hid_blacklist { | |||
969 | 972 | ||
970 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, | 973 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_USB_RECEIVER, HID_QUIRK_BAD_RELATIVE_KEYS }, |
971 | 974 | ||
975 | { USB_VENDOR_ID_PANTHERLORD, USB_DEVICE_ID_PANTHERLORD_TWIN_USB_JOYSTICK, HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, | ||
976 | |||
972 | { 0, 0 } | 977 | { 0, 0 } |
973 | }; | 978 | }; |
974 | 979 | ||