mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
c4146067fd
commit
5556feae1c
3 changed files with 11 additions and 1 deletions
|
|
@ -816,6 +816,7 @@ int hidinput_connect(struct hid_device *hid)
|
|||
struct hid_input *hidinput = NULL;
|
||||
struct input_dev *input_dev;
|
||||
int i, j, k;
|
||||
int max_report_type = HID_OUTPUT_REPORT;
|
||||
|
||||
INIT_LIST_HEAD(&hid->inputs);
|
||||
|
||||
|
|
@ -828,7 +829,10 @@ int hidinput_connect(struct hid_device *hid)
|
|||
if (i == hid->maxcollection)
|
||||
return -1;
|
||||
|
||||
for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++)
|
||||
if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS)
|
||||
max_report_type = HID_INPUT_REPORT;
|
||||
|
||||
for (k = HID_INPUT_REPORT; k <= max_report_type; k++)
|
||||
list_for_each_entry(report, &hid->report_enum[k].report_list, list) {
|
||||
|
||||
if (!report->maxfield)
|
||||
|
|
|
|||
Loading…
Reference in a new issue