]> git.baikalelectronics.ru Git - kernel.git/commit
HID: input: fix a4tech horizontal wheel custom usage
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tue, 11 Jun 2019 12:13:20 +0000 (14:13 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 5 Aug 2019 12:37:15 +0000 (14:37 +0200)
commit6a6dc4a649759c9663b125fa578b851227347b0a
tree649b3c43763616dba42506642fa5636e88624a1d
parentd64d48198a5c3289fd5288485a69f66bbb6a540d
HID: input: fix a4tech horizontal wheel custom usage

Some a4tech mice use the 'GenericDesktop.00b8' usage to inform whether
the previous wheel report was horizontal or vertical. Before
fb876fcae5e48 ("HID: input: add mapping for "Toggle Display" key") this
usage was being mapped to 'Relative.Misc'. After the patch it's simply
ignored (usage->type == 0 & usage->code == 0). Which ultimately makes
hid-a4tech ignore the WHEEL/HWHEEL selection event, as it has no
usage->type.

We shouldn't rely on a mapping for that usage as it's nonstandard and
doesn't really map to an input event. So we bypass the mapping and make
sure the custom event handling properly handles both reports.

Fixes: fb876fcae5e48 ("HID: input: add mapping for "Toggle Display" key")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-a4tech.c