aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/x86/Makefile
diff options
context:
space:
mode:
authorGravatar Gergo Koteles <soyer@irl.hu> 2023-03-28 18:45:59 -0700
committerGravatar Hans de Goede <hdegoede@redhat.com> 2023-04-06 12:33:34 +0200
commite82882cdd241b78d305df1441c624fbbbd07af05 (patch)
tree40f09047b5960353ae1129d9f3ef889fc0c9be53 /drivers/platform/x86/Makefile
parentplatform/x86: Move ideapad ACPI helpers to a new header (diff)
downloadlinux-e82882cdd241b78d305df1441c624fbbbd07af05.tar.gz
linux-e82882cdd241b78d305df1441c624fbbbd07af05.tar.bz2
linux-e82882cdd241b78d305df1441c624fbbbd07af05.zip
platform/x86: Add driver for Yoga Tablet Mode switch
This WMI driver for the tablet mode control switch for Lenovo Yoga notebooks was originally written by Gergo Koteles. The mode is mapped to a SW_TABLET_MODE switch capable input device. Andrew followed the suggestions that were posted in reply to Gergo's RFC patch, and on the v1 & v2 versions of this patch to follow-up and get it merged. Changes from Gergo's RFC: - Refactored obtaining a reference to the EC ACPI device needed for the quirk implementation as suggested by Hans de Goede - Applied small fixes and switched to always registering handles with the driver for automatic cleanup as suggested by Barnabás Pőcze. - Merged the lenovo_ymc_trigger_ec function with the ideapad_trigger_ymc_next_read function since it was no longer external. - Added the word "Tablet" to the driver description to hopefully make it more clear. - Fixed the LENOVO_YMC_QUERY_METHOD ID and the name string for the EC APCI device trigged for the quirk - Triggered the input event on probe so that the initial tablet mode state when the driver is loaded is reported to userspace as suggested by Armin Wolf. - Restricted the permissions of the ec_trigger parameter as suggested by Armin Wolf. Also updated the description. We have tested this on the Yoga 7 14AIL7 for the non-quirk path and on the Yoga 7 14ARB7 which has the firmware bug that requires triggering the embedded controller to send the mode change events. This workaround is also used by the Windows drivers. According to reports at https://github.com/lukas-w/yoga-usage-mode, which uses the same WMI devices, the following models should also work: Yoga C940, Ideapad flex 14API, Yoga 9 14IAP7, Yoga 7 14ARB7, etc. Signed-off-by: Gergo Koteles <soyer@irl.hu> Co-developed-by: Andrew Kallmeyer <kallmeyeras@gmail.com> Signed-off-by: Andrew Kallmeyer <kallmeyeras@gmail.com> Link: https://lore.kernel.org/r/20221004214332.35934-1-soyer@irl.hu/ Link: https://lore.kernel.org/r/20230310041726.217447-1-kallmeyeras@gmail.com/ Link: https://lore.kernel.org/r/20230323025200.5462-1-kallmeyeras@gmail.com/ Tested-by: André Apitzsch <git@apitzsch.eu> Link: https://lore.kernel.org/r/20230329014559.44494-3-kallmeyeras@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/Makefile')
-rw-r--r--drivers/platform/x86/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 27550cf6d4fb..2cafe51ec4d8 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -62,6 +62,7 @@ obj-$(CONFIG_UV_SYSFS) += uv_sysfs.o
# IBM Thinkpad and Lenovo
obj-$(CONFIG_IBM_RTL) += ibm_rtl.o
obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
+obj-$(CONFIG_LENOVO_YMC) += lenovo-ymc.o
obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
obj-$(CONFIG_THINKPAD_LMI) += think-lmi.o