platform/x86: x86-android-tablets: Add support for the Dolby button on Peaq C1010
authorHans de Goede <hdegoede@redhat.com>
Mon, 20 Feb 2023 20:26:42 +0000 (21:26 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 7 Mar 2023 11:08:31 +0000 (12:08 +0100)
commit772cbba5a877eb7c528f3659415373c40e48a057
tree139d993f30961310588bfa0d0957f3e7d813320b
parente2200d3f26dac108a519f014fb42a0a034105394
platform/x86: x86-android-tablets: Add support for the Dolby button on Peaq C1010

The Peaq C1010 tablet has a special "Dolby" button. This button has
a WMI interface, but this is broken in several ways:

1. It only supports polling
2. The value read on polling goes from 0 -> 1 for one poll on both edges
   of the button, with no way to tell which edge causes the poll to
   return 1.
3. It uses a non unique GUID (it uses the Microsoft docs WMI example GUID).

There currently is a WMI driver for this, but it uses several kludges
to work around these issues and is not entirely reliable due to 2.

Replace the unreliable WMI driver by using the x86-android-tablets code
to instantiate a gpio_keys device for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230301092331.7038-11-hdegoede@redhat.com
MAINTAINERS
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/peaq-wmi.c [deleted file]
drivers/platform/x86/x86-android-tablets/dmi.c
drivers/platform/x86/x86-android-tablets/other.c
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h