aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2007-08-11 17:39:42 -0400
committerJiri Kosina <jkosina@suse.cz>2007-10-14 07:40:01 -0400
commit82eb121989c06e3de33b56ade1fa52c9e86c014e (patch)
tree79c1a02a086874b2e777b7baecbbef0508fad126 /drivers/hid
parent77b296629d6e938e68de40195a9d500f209f6d10 (diff)
HID: ignore all non-LED usages in output fields in hid-input
We have to ignore all non-LED usages in output fields if the report descriptor of the device specifies any. If we don't do so, the devices which contain the same usages both in input and output reports with different parameters will mess things up. In hid-input, we currently care only for the input usages, with exception for LEDs. All other output usages should be properly handled by appropriate force-feedback driver. Fixes auto-calibration for Saitek Cyborg Evo Force joystick. Reported-by: Renato Golin <rengolin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-input.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index de8dbec6aae5..f80b57142cd4 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -355,6 +355,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
355 if (field->flags & HID_MAIN_ITEM_CONSTANT) 355 if (field->flags & HID_MAIN_ITEM_CONSTANT)
356 goto ignore; 356 goto ignore;
357 357
358 /* only LED usages are supported in output fields */
359 if (field->report_type == HID_OUTPUT_REPORT &&
360 (usage->hid & HID_USAGE_PAGE) != HID_UP_LED) {
361 dbg_hid_line(" [non-LED output field] ");
362 goto ignore;
363 }
364
358 switch (usage->hid & HID_USAGE_PAGE) { 365 switch (usage->hid & HID_USAGE_PAGE) {
359 366
360 case HID_UP_UNDEFINED: 367 case HID_UP_UNDEFINED: