platform/x86: lenovo-yogabook: Add platform driver support
authorHans de Goede <hdegoede@redhat.com>
Sun, 30 Apr 2023 16:58:05 +0000 (18:58 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 9 May 2023 10:33:37 +0000 (12:33 +0200)
commit6df1523fa0b7991ea9c8e2ef8f9a238b19309a5d
tree4e1db127b68c1965a3152c6a79d17085ca867fe0
parent37b599ae3fc98bc471790b09915369bba49635dd
platform/x86: lenovo-yogabook: Add platform driver support

The Lenovo Yoga Book 1 comes in 2 versions.

Version 1: The yb1-x91f/l currently supported by lenovo-yogabook-wmi, which
has a WMI interface to deal with toggling the keyboard half between
touch-keyboard and wacom-digitizer mode.

Version 2: The yb1-x90f/l which is the same hardware shipping with Android
as factory OS. This version has a very different BIOS and ACPI tables which
lack the WMI interface.

Instead the x86-android-tablets.ko code which does devices instantiation
for devices missing from ACPI on various x86 Android tablets will
instantiate a platform device for the keyboard half touch-kbd/digitizer
toggle functionality.

This patch adds a platform driver to the lenovo-yogabook code which binds
to the platform device instantiated by x86-android-tablets.ko offering
touch-kbd/digitizer toggle functionality on the Android model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230430165807.472798-18-hdegoede@redhat.com
drivers/platform/x86/lenovo-yogabook-wmi.c