mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Rong Zhang" <i@rong.moe>,
	"Derek J . Clark" <derekjohn.clark@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Gergo Koteles" <soyer@irl.hu>, "Ike Panhc" <ikepanhc@gmail.com>,
	"Andrew Kallmeyer" <kallmeyeras@gmail.com>
Cc: "platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	linux-kernel@vger.kernel.org,
	"Mahir Faisal" <mahirfaisalantiq33@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 0/7] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
Date: Sun, 15 Nov 2026 17:38:35 -0500	[thread overview]
Message-ID: <859daa2c-e891-410c-a528-58fc49a2ccea@app.fastmail.com> (raw)
In-Reply-To: <20261116-ymc-82yl-v1-0-fac1a2b01a84@rong.moe>



On Sun, Nov 15, 2026, at 2:27 PM, Rong Zhang wrote:
> Currently, the ideapad-laptop driver triggers the EC with YMC command
> 0x01, which seems to be randomly chosen with trail-and-error and turns

typo: trial-and-error (this is in patch 6 too)

> 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@gmail.com>
> Closes: 
> https://msgid.link/CAGAHqH6o0TUa1HXMrNV6e+HNYwU3xxHkOM665756n8Cp3AzhVQ@mail.gmail.com
> Signed-off-by: Rong Zhang <i@rong.moe>
> ---
> 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

I feel like I should be able to find some more formal documentation on this, but as these platforms aren't in the Linux program not sure what I'll get (or how long it will take) and the series looks good to me. I'll see what I can find so hopefully we can avoid a long list of quirks (as needed in patch 7).

One open question on patch 4 - but patches 1 to 3 and 5 to 7 look good to me. For those:
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>

      parent reply	other threads:[~2026-11-15 22:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 19:27 Rong Zhang
2026-11-15 19:27 ` [PATCH 1/7] platform/x86: lenovo-ymc: Use enumeration to represent device posture Rong Zhang
2026-11-15 19:27 ` [PATCH 2/7] platform/x86: lenovo-ymc: Serialize WMI event handling Rong Zhang
2026-11-15 19:27 ` [PATCH 3/7] platform/x86: lenovo-wmi-events: Modernize " Rong Zhang
2026-11-15 19:27 ` [PATCH 4/7] platform/x86: lenovo-ymc: Modernize WMI driver and factor out events Rong Zhang
2026-11-15 22:39   ` Mark Pearson
2026-11-15 19:27 ` [PATCH 5/7] platform/x86: lenovo-ymc: Refresh posture on resume Rong Zhang
2026-11-15 19:27 ` [PATCH 6/7] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
2026-11-15 19:27 ` [PATCH 7/7] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8 Rong Zhang
2026-11-15 22:38 ` Mark Pearson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=859daa2c-e891-410c-a528-58fc49a2ccea@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=derekjohn.clark@gmail.com \
    --cc=hansg@kernel.org \
    --cc=i@rong.moe \
    --cc=ikepanhc@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kallmeyeras@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahirfaisalantiq33@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=soyer@irl.hu \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®