linux-stable/drivers/hid/i2c-hid
Dmitry Torokhov c95f4de663 HID: retain initial quirks set up when creating HID devices
[ Upstream commit 03a8610555 ]

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: b60d3c803d ("HID: i2c-hid-of: Expose the touchscreen-inverted properties")
Fixes: a2f416bf06 ("HID: multitouch: Add quirks for flipped axes")
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Tested-by: Allen Ballway <ballway@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Alistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/Y+LYwu3Zs13hdVDy@google.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:21 +01:00
..
i2c-hid-acpi.c HID: i2c-hid-of: Expose the touchscreen-inverted properties 2021-12-14 11:38:04 +01:00
i2c-hid-core.c HID: retain initial quirks set up when creating HID devices 2023-03-10 09:33:21 +01:00
i2c-hid-dmi-quirks.c HID: retain initial quirks set up when creating HID devices 2023-03-10 09:33:21 +01:00
i2c-hid-of-elan.c HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00
i2c-hid-of-goodix.c HID: i2c-hid: goodix: Fix a lockdep splat 2022-02-02 14:47:46 +01:00
i2c-hid-of.c HID: i2c-hid-of: Expose the touchscreen-inverted properties 2021-12-14 11:38:04 +01:00
i2c-hid.h HID: multitouch: Add quirks for flipped axes 2023-03-10 09:33:20 +01:00
Kconfig HID: fix I2C_HID not selected when I2C_HID_OF_ELAN is 2022-11-15 16:27:22 +01:00
Makefile HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00