platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices
authorHans de Goede <hdegoede@redhat.com>
Mon, 19 Oct 2020 18:56:28 +0000 (20:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Mar 2021 12:51:05 +0000 (13:51 +0100)
commitcf09ec2596c7854d32498b3def2664ae0dbe7ca3
treef9c78c44e65e7524849bd4074a143eeee08eacec
parentf79453d6e5fbc9d7fb6c7ff689793f65a312633f
platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices

[ Upstream commit 5c54cb6c627e8f50f490e6b5656051a5ac29eab4 ]

Add support for SW_TABLET_MODE on the Acer Switch 10 (SW5-012) and the
acer Switch 10 (S1003) models.

There is no way to detect if this is supported, so this uses DMI based
quirks setting force_caps to ACER_CAP_KBD_DOCK (these devices have no
other acer-wmi based functionality).

The new SW_TABLET_MODE functionality can be tested on devices which
are not in the DMI table by passing acer_wmi.force_caps=0x40 on the
kernel commandline.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201019185628.264473-6-hdegoede@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/acer-wmi.c