]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 4 Sep 2019 06:16:38 +0000 (02:16 -0400)
commitd05b03ca6aa708035d51bb30155b2397135d0d6e
treea59d37594590450336c39db03f9fe7ae9945a397
parentbb9953f8dd4010fe5f02151825d7532b6cc7fb75
HID: input: fix a4tech horizontal wheel custom usage

BugLink: https://bugs.launchpad.net/bugs/1842114
[ Upstream commit 1c703b53e5bfb5c2205c30f0fb157ce271fd42fb ]

Some a4tech mice use the 'GenericDesktop.00b8' usage to inform whether
the previous wheel report was horizontal or vertical. Before
c01908a14bf73 ("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: c01908a14bf73 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/hid/hid-a4tech.c