HID: compute an ordered list of input fields to process
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 3 Feb 2022 14:32:21 +0000 (15:32 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Mar 2022 14:46:02 +0000 (15:46 +0100)
commit22f4b026c3ddd4b26c5baa202bd3ee38feaa2e9a
treef5ac2dd7e99a7afe1582e662e8bc05553c4b98b5
parent187ccd6caa4b40dcfbcb2531746e9fe500414e79
HID: compute an ordered list of input fields to process

This will be used in a later commit:
we build a list of input fields (and usage_index) that is ordered based
on a usage priority.

Changing the usage priority allows to re-order the processed list, meaning
that we can enforce some usages to be process before others.

For instance, before processing InRange in the HID tablets, we need to
know if we are using the eraser (side or button). Enforcing a higher
(lower number) priority for Invert allows to force the input stack to
process that field before.

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-core.c
include/linux/hid.h