[PATCH 0/7] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
From: Rong Zhang
Date: Sun Nov 15 2026 - 14:28:24 EST
Currently, the ideapad-laptop driver triggers the EC with YMC command
0x01, which seems to be randomly chosen with trail-and-error and turns
out to be not a command for YMC events. While the devices in the DMI
quirk table recognize it, some other devices do not, making the
trigger_ec functionality a no-op.
Lenovo's YMC driver for Windows (YMC.exe) emits YMC command 0x08/0x09 on
fold/unfold YMC events, in which "unfold" means laptop mode and "fold"
means other modes.
Adopt the said sequence to make it work on all relevant devices. For the
sake of caution, only emit YMC command 0x08 only for the known fold
postures. For all other postures (including unknown ones), emit 0x09 to
make sure the touchpad and keyboard are still functional.
Beforehand, also fix pre-existing issues, modernize relevant WMI
drivers, and add a resume callback refreshing the posture and poke
ideapad-laptop to trigger the EC. See each patch for details.
With these changes, add a DMI quirk table entry the Lenovo Yoga 7
14IRL8 as its EC must be triggered by software on YMC events properly
(i.e., with command 0x08/0x09), or else the enable state of touchpad,
keyboard, and keyboard backlight become out of sync.
Reported-by: Mahir Faisal <mahirfaisalantiq33@xxxxxxxxx>
Closes: https://msgid.link/CAGAHqH6o0TUa1HXMrNV6e+HNYwU3xxHkOM665756n8Cp3AzhVQ@xxxxxxxxxxxxxx
Signed-off-by: Rong Zhang <i@xxxxxxxx>
---
Rong Zhang (7):
platform/x86: lenovo-ymc: Use enumeration to represent device posture
platform/x86: lenovo-ymc: Serialize WMI event handling
platform/x86: lenovo-wmi-events: Modernize WMI event handling
platform/x86: lenovo-ymc: Modernize WMI driver and factor out events
platform/x86: lenovo-ymc: Refresh posture on resume
platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8
drivers/platform/x86/lenovo/Kconfig | 2 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 42 +++++++++-
drivers/platform/x86/lenovo/ideapad-laptop.h | 9 ++
drivers/platform/x86/lenovo/wmi-events.c | 38 +++++----
drivers/platform/x86/lenovo/wmi-events.h | 1 +
drivers/platform/x86/lenovo/ymc.c | 118 +++++++++++++++++----------
6 files changed, 147 insertions(+), 63 deletions(-)
---
base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea
change-id: 46a18a06-ymc-82yl-d59b4f8f891e
Thanks,
Rong