platform/x86/intel: hid: Add DMI switches allow list
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 20 Sep 2021 16:03:12 +0000 (18:03 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 21 Sep 2021 13:49:16 +0000 (15:49 +0200)
commitb201cb0ebe87b209e252d85668e517ac1929e250
tree8545142cf70722ee611f31a97cbbd7c05288e623
parent5b72dafaca73b33416c82457ae615e6f2022e901
platform/x86/intel: hid: Add DMI switches allow list

Some devices, even non convertible ones, can send incorrect
SW_TABLET_MODE reports.

Add an allow list and accept such reports only from devices in it.

Bug reported for Dell XPS 17 9710 on:
https://gitlab.freedesktop.org/libinput/libinput/-/issues/662

Reported-by: Tobias Gurtzick <magic@wizardtales.com>
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Tobias Gurtzick <magic@wizardtales.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://lore.kernel.org/r/20210920160312.9787-1-jose.exposito89@gmail.com
[hdegoede@redhat.com: Check dmi_switches_auto_add_allow_list only once]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/hid.c