Skip to content

Commit 8db8be9

Browse files
bentissJiri Kosina
authored andcommitted
HID: input: fix uclogic tablets
commit 87562fc ("HID: input: remove the need for HID_QUIRK_INVERT") made the assumption that it was the only one handling tablets and thus kept an internal state regarding the tool. Turns out that the uclogic driver has a timer to release the in range bit, effectively making hid-input ignoring all in range information after the very first one. Fix that by having a more rationale approach which consists in forwarding every event and let the input stack filter out the duplicates. Reported-by: Stefan Hansson <[email protected]> Fixes: 87562fc ("HID: input: remove the need for HID_QUIRK_INVERT") Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 750ec97 commit 8db8be9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/hid/hid-input.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,10 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
15341534
* assume ours
15351535
*/
15361536
if (!report->tool)
1537-
hid_report_set_tool(report, input, usage->code);
1537+
report->tool = usage->code;
1538+
1539+
/* drivers may have changed the value behind our back, resend it */
1540+
hid_report_set_tool(report, input, report->tool);
15381541
} else {
15391542
hid_report_release_tool(report, input, usage->code);
15401543
}

0 commit comments

Comments
 (0)