]> git.baikalelectronics.ru Git - kernel.git/commit
HID: input: enforce Invert usage to be processed before InRange
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 3 Feb 2022 14:32:23 +0000 (15:32 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Mar 2022 14:46:03 +0000 (15:46 +0100)
commit6e7954876b150b0ac96f8ebb27859002ab2a829b
treea26f3204f7707792fa9f9b80250349fa5e4e5615
parent14d8b161226bc4f152b382fc742861f0dc14d38c
HID: input: enforce Invert usage to be processed before InRange

When a device exposes both Invert and InRange, Invert must be processed
before InRange. If we keep the order of the device and we process them
out of order, InRange will first set BTN_TOOL_PEN, and then Invert will
set BTN_TOOL_RUBBER. Userspace knows how to deal with that situation,
but fixing it in the kernel is now easier.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input.c
include/linux/hid.h