Skip to content
Commit 03a86105 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Benjamin Tissoires
Browse files

HID: retain initial quirks set up when creating HID devices



In certain circumstances, such as when creating I2C-connected HID
devices, we want to pass and retain some quirks (axis inversion, etc).
The source of such quirks may be device tree, or DMI data, or something
else not readily available to the HID core itself and therefore cannot
be reconstructed easily. To allow this, introduce "initial_quirks" field
in hid_device structure and use it when determining the final set of
quirks.

This fixes the problem with i2c-hid setting up device-tree sourced
quirks too late and losing them on device rebind, and also allows to
sever the tie between hid-code and i2c-hid when applying DMI-based
quirks.

Fixes: b60d3c80 ("HID: i2c-hid-of: Expose the touchscreen-inverted properties")
Fixes: a2f416bf ("HID: multitouch: Add quirks for flipped axes")
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Tested-by: default avatarAllen Ballway <ballway@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: default avatarAlistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/Y+LYwu3Zs13hdVDy@google.com


Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
parent a2f416bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment