* [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
@ 2026-11-25 18:08 Rong Zhang
2026-11-25 18:08 ` [PATCH v3 1/8] platform/x86: lenovo-ymc: Use enumeration to represent device posture Rong Zhang
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang, stable
Currently, the ideapad-laptop driver triggers the EC with YMC command
0x01, which is necessary for existing devices in the DMI quirk table to
clear the pending event to allow further events to be emitted.
Newer models do not require command 0x01 anymore (writing it is a
no-op), but some of them require other commands to properly synchronize
and set the hardware state.
It turned out that Lenovo's YMC driver for Windows (YMC.exe) writes YMC
command 0x08/0x09 on fold/unfold YMC events, in which "unfold" means
laptop mode and "fold" means other modes.
Adopt the said sequence and combine it with command 0x01 to make
ymc_ec_trigger work on all relevant devices. For the sake of caution,
write command 0x08 only for the known fold postures. For all other
postures (including unknown ones), write 0x09 to make sure the touchpad
and keyboard are still functional. Finally, 0x01 is always written to
ensure the pending event is cleared.
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 DMI quirk table entries for the Lenovo Yoga 7
14IRL8 and 14ARP8 as their EC must be triggered by software on YMC
events with command 0x08/0x09, or else the enable states 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
Reported-by: Eduard Aliman <edialiman20@gmail.com>
Closes: https://msgid.link/CAA4HgYKab7_GMCNdHF9+E=9ECVBHRs_axefeCOnZbUNUoyVSoQ@mail.gmail.co
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Always write YMC command 0x01 at last (thanks Gergo Koteles)
- New patch to address Eduard Aliman's report
- Drop Eduard Aliman's Tested-by: since PATCH 6, please test again
- Link to v2: https://patch.msgid.link/20261125-ymc-82yl-v2-0-624bdcb3c50e@rong.moe
Changes in v2:
- Rephrase the commit message of PATCH 6 (thanks Mark Pearson)
- Fix typos (ditto)
- Link to v1: https://patch.msgid.link/20261116-ymc-82yl-v1-0-fac1a2b01a84@rong.moe
---
Rong Zhang (8):
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
platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14ARP8
drivers/platform/x86/lenovo/Kconfig | 2 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 74 +++++++++++++++--
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, 175 insertions(+), 67 deletions(-)
---
base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc
change-id: 46a18a06-ymc-82yl-d59b4f8f891e
Thanks,
Rong
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 1/8] platform/x86: lenovo-ymc: Use enumeration to represent device posture
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 2/8] platform/x86: lenovo-ymc: Serialize WMI event handling Rong Zhang
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang, stable
There are five known Yoga modes: unknown, laptop, tablet, drawing board,
and tent, but lacks symbolic representations for reuse.
Introduce an enumeration called ymc_posture to collect and represent
them. The lenovo_ymc_keymap is also refactored to use the enumeration.
Cc: stable@vger.kernel.org
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
---
Cc stable as the later fixes depend on this.
---
drivers/platform/x86/lenovo/ideapad-laptop.h | 9 +++++++++
drivers/platform/x86/lenovo/ymc.c | 14 +++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.h b/drivers/platform/x86/lenovo/ideapad-laptop.h
index 1e52f2aa0aac..e29f741ffbf3 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.h
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.h
@@ -15,6 +15,15 @@ enum ideapad_laptop_notifier_actions {
IDEAPAD_LAPTOP_YMC_EVENT,
};
+enum ymc_posture {
+ /* Some devices cannot recognize their postures on boot. */
+ YMC_POSTURE_UNKNOWN = 0,
+ YMC_POSTURE_LAPTOP = 1,
+ YMC_POSTURE_TABLET = 2,
+ YMC_POSTURE_DRAWING_BOARD = 3,
+ YMC_POSTURE_TENT = 4,
+};
+
int ideapad_laptop_register_notifier(struct notifier_block *nb);
int ideapad_laptop_unregister_notifier(struct notifier_block *nb);
void ideapad_laptop_call_notifier(unsigned long action, void *data);
diff --git a/drivers/platform/x86/lenovo/ymc.c b/drivers/platform/x86/lenovo/ymc.c
index 91de02d989a0..70f3ae20d3e3 100644
--- a/drivers/platform/x86/lenovo/ymc.c
+++ b/drivers/platform/x86/lenovo/ymc.c
@@ -64,15 +64,11 @@ struct lenovo_ymc_private {
static const struct key_entry lenovo_ymc_keymap[] = {
/* Ignore the uninitialized state */
- { KE_IGNORE, 0x00 },
- /* Laptop */
- { KE_SW, 0x01, { .sw = { SW_TABLET_MODE, 0 } } },
- /* Tablet */
- { KE_SW, 0x02, { .sw = { SW_TABLET_MODE, 1 } } },
- /* Drawing Board */
- { KE_SW, 0x03, { .sw = { SW_TABLET_MODE, 1 } } },
- /* Tent */
- { KE_SW, 0x04, { .sw = { SW_TABLET_MODE, 1 } } },
+ { KE_IGNORE, YMC_POSTURE_UNKNOWN },
+ { KE_SW, YMC_POSTURE_LAPTOP, { .sw = { SW_TABLET_MODE, 0 } } },
+ { KE_SW, YMC_POSTURE_TABLET, { .sw = { SW_TABLET_MODE, 1 } } },
+ { KE_SW, YMC_POSTURE_DRAWING_BOARD, { .sw = { SW_TABLET_MODE, 1 } } },
+ { KE_SW, YMC_POSTURE_TENT, { .sw = { SW_TABLET_MODE, 1 } } },
{ KE_END },
};
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 2/8] platform/x86: lenovo-ymc: Serialize WMI event handling
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
2026-11-25 18:08 ` [PATCH v3 1/8] platform/x86: lenovo-ymc: Use enumeration to represent device posture Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 3/8] platform/x86: lenovo-wmi-events: Modernize " Rong Zhang
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang, stable
WMI events may arrive in parallel, causing race conditions, e.g.,
CPU1 CPU2
query: posture A
query: posture B
input report B
input report A
trigger EC with B
trigger EC with A
Fix it by serializing lenovo_ymc_notify() with a mutex.
Fixes: e82882cdd241 ("platform/x86: Add driver for Yoga Tablet Mode switch")
Cc: stable@vger.kernel.org
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/platform/x86/lenovo/ymc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/platform/x86/lenovo/ymc.c b/drivers/platform/x86/lenovo/ymc.c
index 70f3ae20d3e3..eba22600161e 100644
--- a/drivers/platform/x86/lenovo/ymc.c
+++ b/drivers/platform/x86/lenovo/ymc.c
@@ -10,9 +10,11 @@
#include <linux/acpi.h>
#include <linux/bitfield.h>
#include <linux/bits.h>
+#include <linux/cleanup.h>
#include <linux/dmi.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
+#include <linux/mutex.h>
#include <linux/wmi.h>
#include "ideapad-laptop.h"
@@ -60,6 +62,7 @@ static const struct dmi_system_id allowed_chasis_types_dmi_table[] = {
struct lenovo_ymc_private {
struct input_dev *input_dev;
+ struct mutex mutex; /* Protects event handling. */
};
static const struct key_entry lenovo_ymc_keymap[] = {
@@ -82,6 +85,8 @@ static void lenovo_ymc_notify(struct wmi_device *wdev, union acpi_object *data)
acpi_status status;
int code;
+ guard(mutex)(&priv->mutex);
+
status = wmi_evaluate_method(LENOVO_YMC_QUERY_GUID,
LENOVO_YMC_QUERY_INSTANCE,
LENOVO_YMC_QUERY_METHOD,
@@ -137,6 +142,10 @@ static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx)
if (!input_dev)
return -ENOMEM;
+ err = devm_mutex_init(&wdev->dev, &priv->mutex);
+ if (err)
+ return err;
+
input_dev->name = "Lenovo Yoga Tablet Mode Control switch";
input_dev->phys = LENOVO_YMC_EVENT_GUID "/input0";
input_dev->id.bustype = BUS_HOST;
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 3/8] platform/x86: lenovo-wmi-events: Modernize WMI event handling
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
2026-11-25 18:08 ` [PATCH v3 1/8] platform/x86: lenovo-ymc: Use enumeration to represent device posture Rong Zhang
2026-11-25 18:08 ` [PATCH v3 2/8] platform/x86: lenovo-ymc: Serialize WMI event handling Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 4/8] platform/x86: lenovo-ymc: Modernize WMI driver and factor out events Rong Zhang
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
The WMI core calls the new notify_new() callback with unmarshaled event
data and size check, aligning with the Windows behavior that the ACPI
object type doesn't matter but the size does.
Adopt it to modernize the driver and hopefully improve robustness on
various firmware, like previously did for lenovo-wmi-{capdata,helpers}.
The blocking_notifier_call_chain() code path is also moved, so that it
will be easier when adding new GUIDs to the driver.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/platform/x86/lenovo/wmi-events.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/platform/x86/lenovo/wmi-events.c b/drivers/platform/x86/lenovo/wmi-events.c
index 3a82192dc9e5..01ad5bcf0437 100644
--- a/drivers/platform/x86/lenovo/wmi-events.c
+++ b/drivers/platform/x86/lenovo/wmi-events.c
@@ -9,13 +9,14 @@
* Copyright (C) 2025 Derek J. Clark <derekjohn.clark@gmail.com>
*/
-#include <linux/acpi.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/types.h>
#include <linux/wmi.h>
+#include <asm/byteorder.h>
+
#include "wmi-events.h"
#include "wmi-helpers.h"
@@ -110,25 +111,23 @@ EXPORT_SYMBOL_NS_GPL(devm_lwmi_events_register_notifier, "LENOVO_WMI_EVENTS");
/**
* lwmi_events_notify() - Call functions for the notifier call chain.
* @wdev: The parent WMI device of the driver.
- * @obj: ACPI object passed by the registered WMI Event.
+ * @buf: WMI buffer passed by the registered WMI Event.
*
* Validate WMI event data and notify all registered drivers of the event and
* its output.
*
* Return: 0 on success, or an error code.
*/
-static void lwmi_events_notify(struct wmi_device *wdev, union acpi_object *obj)
+static void lwmi_events_notify(struct wmi_device *wdev, const struct wmi_buffer *buf)
{
struct lwmi_events_priv *priv = dev_get_drvdata(&wdev->dev);
+ void *notif_data = NULL;
int sel_prof;
int ret;
switch (priv->type) {
case LWMI_EVENT_THERMAL_MODE:
- if (obj->type != ACPI_TYPE_INTEGER)
- return;
-
- sel_prof = obj->integer.value;
+ sel_prof = le32_to_cpup(buf->data);
switch (sel_prof) {
case LWMI_GZ_THERMAL_MODE_QUIET:
@@ -136,13 +135,8 @@ static void lwmi_events_notify(struct wmi_device *wdev, union acpi_object *obj)
case LWMI_GZ_THERMAL_MODE_PERFORMANCE:
case LWMI_GZ_THERMAL_MODE_EXTREME:
case LWMI_GZ_THERMAL_MODE_CUSTOM:
- ret = blocking_notifier_call_chain(&events_chain_head,
- LWMI_EVENT_THERMAL_MODE,
- &sel_prof);
- if (ret == NOTIFY_BAD)
- dev_err(&wdev->dev,
- "Failed to send notification to call chain for WMI Events\n");
- return;
+ notif_data = &sel_prof;
+ break;
default:
dev_err(&wdev->dev, "Got invalid thermal mode: %x",
sel_prof);
@@ -152,6 +146,13 @@ static void lwmi_events_notify(struct wmi_device *wdev, union acpi_object *obj)
default:
return;
}
+
+ ret = blocking_notifier_call_chain(&events_chain_head, priv->type, notif_data);
+ if (ret == NOTIFY_BAD) {
+ dev_err(&wdev->dev,
+ "Failed to send notification to call chain for WMI event type %d\n",
+ priv->type);
+ }
}
static int lwmi_events_probe(struct wmi_device *wdev, const void *context)
@@ -185,7 +186,7 @@ static struct wmi_driver lwmi_events_driver = {
.id_table = lwmi_events_id_table,
.min_event_size = sizeof(u32),
.probe = lwmi_events_probe,
- .notify = lwmi_events_notify,
+ .notify_new = lwmi_events_notify,
.no_singleton = true,
};
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 4/8] platform/x86: lenovo-ymc: Modernize WMI driver and factor out events
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (2 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 3/8] platform/x86: lenovo-wmi-events: Modernize " Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 5/8] platform/x86: lenovo-ymc: Refresh posture on resume Rong Zhang
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
The lenovo-ymc driver is a legacy WMI driver. It binds to the events
GUID as a WMI driver but calls the query GUID with the deprecated GUID-
based interface.
Handle YMC events in lenovo-wmi-event, and coordinate relevant drivers
with notifier chains:
+---LWMI_EVENT_THERMAL_MODE---> wmi-gamezone
|
wmi-events ---+
|
+---LWMI_EVENT_YMC---> ymc ---IDEAPAD_LAPTOP_YMC_EVENT---> ideapad-laptop
Modernize the lenovo-ymc driver by adopting lwmi_dev_evaluate_int() from
lenovo-wmi-helpers, which has adopted the modern WMI core interfaces and
taken care of buffer's lifecycle. This should hopefully improve
robustness on various firmware as it aligns with the Windows behavior
that ACPI object type doesn't matter but the size does.
Note that the WMI core does not verify min_event_size for the legacy
notify() callback (it only ensures the event has data). By factoring out
YMC events to lenovo-wmi-events with the new notify_new() callback, now
the WMI core can finally verify the size of event data:
[WmiDataId(1), read, Description("Lenovo Yoga Mode Change Event")] uint32 ModeDataVal;
With these changes, the lenovo-ymc driver become a no_singleton
asynchronous-probe driver that only binds to the query GUID.
Also ensure the EC is always triggered on valid events (i.e., passing
the min_event_size check) and on probe. In this manner:
- on LENOVO_YMC_QUERY_METHOD success, everything is fine. Otherwise...
- on probe, fall back to YMC_POSTURE_UNKNOWN
- sparse_keymap_report_event() becomes a no-op
- trigger the EC to ensure the keyboard and touchpad are enabled
(following changes), or else the user may be unable to input
anything
- on event, fall back to the event data
- the event carries data as per the MOF (see above)
- the WMI core has verified that the event has 4-byte-or-more data
- if the event data is correct, everything is fine
- if the event data is bogus, it's probably either YMC_POSTURE_UNKNOWN
(0) or an undefined value (>4). In either case, trigger the EC to
ensure the keyboard and touchpad are enabled for the same reason
The input device's phys string also adopts the query GUID rather than
the events one. It shouldn't break anything, as nothing actually matches
the previous phys string.
The DMI quirk tables are left untouched, as the contained devices should
have both GUIDs.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v2:
- Rephrase the commit message (thanks Mark Pearson)
---
drivers/platform/x86/lenovo/Kconfig | 2 +
drivers/platform/x86/lenovo/wmi-events.c | 7 +++
drivers/platform/x86/lenovo/wmi-events.h | 1 +
drivers/platform/x86/lenovo/ymc.c | 85 ++++++++++++++++++--------------
4 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
index 516594993073..f16b09bab082 100644
--- a/drivers/platform/x86/lenovo/Kconfig
+++ b/drivers/platform/x86/lenovo/Kconfig
@@ -63,6 +63,8 @@ config LENOVO_YMC
depends on INPUT
depends on IDEAPAD_LAPTOP
select INPUT_SPARSEKMAP
+ select LENOVO_WMI_EVENTS
+ select LENOVO_WMI_HELPERS
help
This driver maps the Tablet Mode Control switch to SW_TABLET_MODE input
events for Lenovo Yoga notebooks.
diff --git a/drivers/platform/x86/lenovo/wmi-events.c b/drivers/platform/x86/lenovo/wmi-events.c
index 01ad5bcf0437..a0ddea01213f 100644
--- a/drivers/platform/x86/lenovo/wmi-events.c
+++ b/drivers/platform/x86/lenovo/wmi-events.c
@@ -21,6 +21,7 @@
#include "wmi-helpers.h"
#define THERMAL_MODE_EVENT_GUID "D320289E-8FEA-41E0-86F9-911D83151B5F"
+#define YOGA_MODE_CHANGE_EVENT_GUID "06129D99-6083-4164-81AD-F092F9D773A6"
#define LWMI_EVENT_DEVICE(guid, type) \
.guid_string = (guid), .context = &(enum lwmi_events_type) \
@@ -123,6 +124,7 @@ static void lwmi_events_notify(struct wmi_device *wdev, const struct wmi_buffer
struct lwmi_events_priv *priv = dev_get_drvdata(&wdev->dev);
void *notif_data = NULL;
int sel_prof;
+ u32 ymc_mode;
int ret;
switch (priv->type) {
@@ -143,6 +145,10 @@ static void lwmi_events_notify(struct wmi_device *wdev, const struct wmi_buffer
return;
}
break;
+ case LWMI_EVENT_YOGA_MODE_CHANGE:
+ ymc_mode = le32_to_cpup(buf->data);
+ notif_data = &ymc_mode;
+ break;
default:
return;
}
@@ -175,6 +181,7 @@ static int lwmi_events_probe(struct wmi_device *wdev, const void *context)
static const struct wmi_device_id lwmi_events_id_table[] = {
{ LWMI_EVENT_DEVICE(THERMAL_MODE_EVENT_GUID, LWMI_EVENT_THERMAL_MODE) },
+ { LWMI_EVENT_DEVICE(YOGA_MODE_CHANGE_EVENT_GUID, LWMI_EVENT_YOGA_MODE_CHANGE) },
{}
};
diff --git a/drivers/platform/x86/lenovo/wmi-events.h b/drivers/platform/x86/lenovo/wmi-events.h
index cd34e886912c..592da08ff2a3 100644
--- a/drivers/platform/x86/lenovo/wmi-events.h
+++ b/drivers/platform/x86/lenovo/wmi-events.h
@@ -10,6 +10,7 @@ struct notifier_block;
enum lwmi_events_type {
LWMI_EVENT_THERMAL_MODE = 1,
+ LWMI_EVENT_YOGA_MODE_CHANGE = 2,
};
int lwmi_events_register_notifier(struct notifier_block *nb);
diff --git a/drivers/platform/x86/lenovo/ymc.c b/drivers/platform/x86/lenovo/ymc.c
index eba22600161e..cb3ae49dfd9e 100644
--- a/drivers/platform/x86/lenovo/ymc.c
+++ b/drivers/platform/x86/lenovo/ymc.c
@@ -3,22 +3,25 @@
* lenovo-ymc.c - Lenovo Yoga Mode Control driver
*
* Copyright © 2022 Gergo Koteles <soyer@irl.hu>
+ * Copyright © 2026 Rong Zhang <i@rong.moe>
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-#include <linux/acpi.h>
#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/cleanup.h>
+#include <linux/container_of.h>
#include <linux/dmi.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/mutex.h>
+#include <linux/notifier.h>
#include <linux/wmi.h>
#include "ideapad-laptop.h"
+#include "wmi-events.h"
+#include "wmi-helpers.h"
-#define LENOVO_YMC_EVENT_GUID "06129D99-6083-4164-81AD-F092F9D773A6"
#define LENOVO_YMC_QUERY_GUID "09B0EE6E-C3FD-4243-8DA1-7911FF80BB8C"
#define LENOVO_YMC_QUERY_INSTANCE 0
@@ -61,8 +64,10 @@ static const struct dmi_system_id allowed_chasis_types_dmi_table[] = {
};
struct lenovo_ymc_private {
+ struct wmi_device *wdev;
struct input_dev *input_dev;
struct mutex mutex; /* Protects event handling. */
+ struct notifier_block nb;
};
static const struct key_entry lenovo_ymc_keymap[] = {
@@ -75,49 +80,44 @@ static const struct key_entry lenovo_ymc_keymap[] = {
{ KE_END },
};
-static void lenovo_ymc_notify(struct wmi_device *wdev, union acpi_object *data)
+static void lenovo_ymc_refresh(struct lenovo_ymc_private *priv, u32 code)
{
- struct lenovo_ymc_private *priv = dev_get_drvdata(&wdev->dev);
- u32 input_val = 0;
- struct acpi_buffer input = { sizeof(input_val), &input_val };
- struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
- union acpi_object *obj;
- acpi_status status;
- int code;
+ struct wmi_device *wdev = priv->wdev;
+ u32 input = 0, output;
+ int ret;
guard(mutex)(&priv->mutex);
- status = wmi_evaluate_method(LENOVO_YMC_QUERY_GUID,
- LENOVO_YMC_QUERY_INSTANCE,
- LENOVO_YMC_QUERY_METHOD,
- &input, &output);
-
- if (ACPI_FAILURE(status)) {
- dev_warn(&wdev->dev,
- "Failed to evaluate query method: %s\n",
- acpi_format_exception(status));
- return;
- }
-
- obj = output.pointer;
-
- if (obj->type != ACPI_TYPE_INTEGER) {
- dev_warn(&wdev->dev,
- "WMI event data is not an integer\n");
- goto free_obj;
- }
+ ret = lwmi_dev_evaluate_int(wdev, LENOVO_YMC_QUERY_INSTANCE, LENOVO_YMC_QUERY_METHOD,
+ (unsigned char *)&input, sizeof(input), &output);
+ if (ret)
+ dev_warn(&wdev->dev, "Failed to invoke query method: %d\n", ret);
+ else
+ code = output;
/* strip upper bits (e.g. 0x50000) on newer devices */
- code = FIELD_GET(LENOVO_YMC_STATE_MASK, obj->integer.value);
+ code = FIELD_GET(LENOVO_YMC_STATE_MASK, code);
if (!sparse_keymap_report_event(priv->input_dev, code, 1, true))
dev_warn(&wdev->dev, "Unknown key %d pressed\n", code);
-free_obj:
- kfree(obj);
ideapad_laptop_call_notifier(IDEAPAD_LAPTOP_YMC_EVENT, &code);
}
+static int lenovo_ymc_notify(struct notifier_block *nb, unsigned long action, void *data)
+{
+ struct lenovo_ymc_private *priv = container_of(nb, struct lenovo_ymc_private, nb);
+ const u32 *p = data;
+
+ switch (action) {
+ case LWMI_EVENT_YOGA_MODE_CHANGE:
+ lenovo_ymc_refresh(priv, *p);
+ return NOTIFY_OK;
+ default:
+ return NOTIFY_DONE;
+ }
+}
+
static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx)
{
struct lenovo_ymc_private *priv;
@@ -147,7 +147,7 @@ static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx)
return err;
input_dev->name = "Lenovo Yoga Tablet Mode Control switch";
- input_dev->phys = LENOVO_YMC_EVENT_GUID "/input0";
+ input_dev->phys = LENOVO_YMC_QUERY_GUID "/input0";
input_dev->id.bustype = BUS_HOST;
input_dev->dev.parent = &wdev->dev;
err = sparse_keymap_setup(input_dev, lenovo_ymc_keymap, NULL);
@@ -164,16 +164,24 @@ static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx)
return err;
}
+ priv->wdev = wdev;
priv->input_dev = input_dev;
+ priv->nb.notifier_call = lenovo_ymc_notify;
dev_set_drvdata(&wdev->dev, priv);
+ err = devm_lwmi_events_register_notifier(&wdev->dev, &priv->nb);
+ if (err) {
+ dev_err(&wdev->dev, "Could not register YMC events notifier: %d\n", err);
+ return err;
+ }
+
/* Report the state for the first time on probe */
- lenovo_ymc_notify(wdev, NULL);
+ lenovo_ymc_refresh(priv, YMC_POSTURE_UNKNOWN);
return 0;
}
static const struct wmi_device_id lenovo_ymc_wmi_id_table[] = {
- { .guid_string = LENOVO_YMC_EVENT_GUID },
+ { .guid_string = LENOVO_YMC_QUERY_GUID },
{ }
};
MODULE_DEVICE_TABLE(wmi, lenovo_ymc_wmi_id_table);
@@ -181,16 +189,19 @@ MODULE_DEVICE_TABLE(wmi, lenovo_ymc_wmi_id_table);
static struct wmi_driver lenovo_ymc_driver = {
.driver = {
.name = "lenovo-ymc",
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.id_table = lenovo_ymc_wmi_id_table,
- .min_event_size = sizeof(u32),
.probe = lenovo_ymc_probe,
- .notify = lenovo_ymc_notify,
+ .no_singleton = true,
};
module_wmi_driver(lenovo_ymc_driver);
MODULE_AUTHOR("Gergo Koteles <soyer@irl.hu>");
+MODULE_AUTHOR("Rong Zhang <i@rong.moe>");
MODULE_DESCRIPTION("Lenovo Yoga Mode Control driver");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("IDEAPAD_LAPTOP");
+MODULE_IMPORT_NS("LENOVO_WMI_EVENTS");
+MODULE_IMPORT_NS("LENOVO_WMI_HELPERS");
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 5/8] platform/x86: lenovo-ymc: Refresh posture on resume
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (3 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 4/8] platform/x86: lenovo-ymc: Modernize WMI driver and factor out events Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 6/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
When the device's posture is changed during suspend, the software
posture may become out of sync after resume.
Add a resume callback refreshing the posture and poke ideapad-laptop to
trigger the EC.
Reported-by: Mahir Faisal <mahirfaisalantiq33@gmail.com>
Closes: https://msgid.link/CAGAHqH62UiDKktoqg6cJ_oqj02NqH6FDjj32ucw7w+L2-_-NOg@mail.gmail.com
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/platform/x86/lenovo/ymc.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/platform/x86/lenovo/ymc.c b/drivers/platform/x86/lenovo/ymc.c
index cb3ae49dfd9e..b2bb8ad9de0c 100644
--- a/drivers/platform/x86/lenovo/ymc.c
+++ b/drivers/platform/x86/lenovo/ymc.c
@@ -17,6 +17,7 @@
#include <linux/input/sparse-keymap.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
+#include <linux/pm.h>
#include <linux/wmi.h>
#include "ideapad-laptop.h"
#include "wmi-events.h"
@@ -118,6 +119,16 @@ static int lenovo_ymc_notify(struct notifier_block *nb, unsigned long action, vo
}
}
+static int lenovo_ymc_resume(struct device *dev)
+{
+ struct lenovo_ymc_private *priv = dev_get_drvdata(dev);
+
+ lenovo_ymc_refresh(priv, YMC_POSTURE_UNKNOWN);
+ return 0;
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(lenovo_ymc_pm_ops, NULL, lenovo_ymc_resume);
+
static int lenovo_ymc_probe(struct wmi_device *wdev, const void *ctx)
{
struct lenovo_ymc_private *priv;
@@ -189,6 +200,7 @@ MODULE_DEVICE_TABLE(wmi, lenovo_ymc_wmi_id_table);
static struct wmi_driver lenovo_ymc_driver = {
.driver = {
.name = "lenovo-ymc",
+ .pm = pm_sleep_ptr(&lenovo_ymc_pm_ops),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.id_table = lenovo_ymc_wmi_id_table,
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 6/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (4 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 5/8] platform/x86: lenovo-ymc: Refresh posture on resume Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 7/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8 Rong Zhang
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
Currently, the ideapad-laptop driver triggers the EC with YMC command
0x01, which is necessary for existing devices in the DMI quirk table to
clear the pending event to allow further events to be emitted.
Newer models do not require command 0x01 anymore (writing it is a
no-op), but some of them require other commands to properly synchronize
and set the hardware state.
It turned out that Lenovo's YMC driver for Windows (YMC.exe) writes YMC
command 0x08/0x09 on fold/unfold YMC events, in which "unfold" means
laptop mode and "fold" means other modes.
Adopt the said sequence and combine it with command 0x01 to make
ymc_ec_trigger work on all relevant devices. For the sake of caution,
write command 0x08 only for the known fold postures. For all other
postures (including unknown ones), write 0x09 to make sure the touchpad
and keyboard are still functional. Finally, 0x01 is always written to
ensure the pending event is cleared.
Reported-by: Mahir Faisal <mahirfaisalantiq33@gmail.com>
Closes: https://msgid.link/CAGAHqH6o0TUa1HXMrNV6e+HNYwU3xxHkOM665756n8Cp3AzhVQ@mail.gmail.com
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- Always write YMC command 0x01 at last (thanks Gergo Koteles)
- Drop Eduard Aliman's Tested-by: due to the change above
Changes in v2:
- Fix typos (thanks Mark Pearson)
---
drivers/platform/x86/lenovo/ideapad-laptop.c | 60 ++++++++++++++++++++++++----
1 file changed, 53 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index 91a8d11c79c5..f3467cd8df36 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -133,6 +133,12 @@ enum {
VPCCMD_W_BL_POWER = 0x33,
};
+enum ymc_cmd {
+ YMC_CMD_CLEAR = 0x01,
+ YMC_CMD_FOLD = 0x08,
+ YMC_CMD_UNFOLD = 0x09,
+};
+
/*
* These correspond to the number of supported states - 1
* Future keyboard types may need a new system, if there's a collision
@@ -1870,10 +1876,11 @@ static const struct dmi_system_id ymc_ec_trigger_quirk_dmi_table[] = {
{ }
};
-static void ideapad_laptop_trigger_ec(void)
+static void ideapad_laptop_trigger_ec(u32 code)
{
struct ideapad_private *priv;
- int ret;
+ enum ymc_cmd cmd;
+ int ret[2];
guard(mutex)(&ideapad_shared_mutex);
@@ -1884,18 +1891,57 @@ static void ideapad_laptop_trigger_ec(void)
if (!priv->features.ymc_ec_trigger)
return;
- scoped_guard(mutex, &priv->vpc_mutex)
- ret = write_ec_cmd(priv->adev->handle, VPCCMD_W_YMC, 1);
- if (ret)
- dev_warn(&priv->platform_device->dev, "Could not write YMC: %d\n", ret);
+ switch (code) {
+ case YMC_POSTURE_TABLET:
+ case YMC_POSTURE_DRAWING_BOARD:
+ case YMC_POSTURE_TENT:
+ /*
+ * Sync keyboard backlight and disable the touchapd and keyboard
+ * only when the device is folded...
+ */
+ cmd = YMC_CMD_FOLD;
+ break;
+ default:
+ /*
+ * ...IOW, whenever there is a chance that the device may be
+ * unfolded, e.g., in laptop mode or any other unknown modes,
+ * sync keyboard backlight and enable the touchapd and keyboard,
+ * so that users don't lose input.
+ */
+ cmd = YMC_CMD_UNFOLD;
+ break;
+ }
+
+ /*
+ * Old and new models behave differently:
+ *
+ * - Old: YMC_CMD_CLEAR clears the pending event to allow further events
+ * to be emitted. Any other YMC commands are no-op.
+ * - New: YMC_CMD_CLEAR is not required anymore and becomes a no-op.
+ * However, YMC_CMD_FOLD/YMC_CMD_UNFOLD must be sent on event
+ * (see above).
+ *
+ * Take the union of the two by writing both commands on both categories
+ * of devices.
+ */
+ scoped_guard(mutex, &priv->vpc_mutex) {
+ ret[0] = write_ec_cmd(priv->adev->handle, VPCCMD_W_YMC, cmd);
+ ret[1] = write_ec_cmd(priv->adev->handle, VPCCMD_W_YMC, YMC_CMD_CLEAR);
+ }
+ if (ret[0] || ret[1]) {
+ dev_warn(&priv->platform_device->dev,
+ "Could not write YMC: %d/%d\n", ret[0], ret[1]);
+ }
}
static int ideapad_laptop_nb_notify(struct notifier_block *nb,
unsigned long action, void *data)
{
+ const u32 *p = data;
+
switch (action) {
case IDEAPAD_LAPTOP_YMC_EVENT:
- ideapad_laptop_trigger_ec();
+ ideapad_laptop_trigger_ec(*p);
break;
}
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 7/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (5 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 6/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 18:08 ` [PATCH v3 8/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14ARP8 Rong Zhang
2026-11-25 19:14 ` [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Eduard Aliman
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
The Lenovo Yoga 7 14IRL8's EC must be triggered by software on YMC
events, or else the enable states of touchpad, keyboard, and keyboard
backlight become out of sync.
Add a DMI quirk table entry for the said device.
Reported-by: Mahir Faisal <mahirfaisalantiq33@gmail.com>
Closes: https://msgid.link/CAGAHqH6o0TUa1HXMrNV6e+HNYwU3xxHkOM665756n8Cp3AzhVQ@mail.gmail.com
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Rong Zhang <i@rong.moe>
---
drivers/platform/x86/lenovo/ideapad-laptop.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index f3467cd8df36..ec060bcb5c88 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -1873,6 +1873,13 @@ static const struct dmi_system_id ymc_ec_trigger_quirk_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "82N7"),
},
},
+ {
+ /* Lenovo Yoga 7 14IRL8 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82YL"),
+ },
+ },
{ }
};
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 8/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14ARP8
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (6 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 7/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8 Rong Zhang
@ 2026-11-25 18:08 ` Rong Zhang
2026-11-25 19:14 ` [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Eduard Aliman
8 siblings, 0 replies; 10+ messages in thread
From: Rong Zhang @ 2026-11-25 18:08 UTC (permalink / raw)
To: Mark Pearson, Derek J. Clark, Hans de Goede, Ilpo Järvinen,
Gergo Koteles, Ike Panhc, Andrew Kallmeyer
Cc: Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
Rong Zhang
The Lenovo Yoga 7 14ARP8's EC must be triggered by software on YMC
events, or else the enable states of touchpad, keyboard, and keyboard
backlight become out of sync.
Add a DMI quirk table entry for the said device.
Reported-by: Eduard Aliman <edialiman20@gmail.com>
Closes: https://msgid.link/CAA4HgYKab7_GMCNdHF9+E=9ECVBHRs_axefeCOnZbUNUoyVSoQ@mail.gmail.com
Signed-off-by: Rong Zhang <i@rong.moe>
---
Changes in v3:
- New patch to address Eduard Aliman's report
- Drop Eduard Aliman's Tested-by: as a prerequisite patch has changed
---
drivers/platform/x86/lenovo/ideapad-laptop.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index ec060bcb5c88..dfd3eda05a4b 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -1880,6 +1880,13 @@ static const struct dmi_system_id ymc_ec_trigger_quirk_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "82YL"),
},
},
+ {
+ /* Lenovo Yoga 7 14ARP8 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82YM"),
+ },
+ },
{ }
};
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
` (7 preceding siblings ...)
2026-11-25 18:08 ` [PATCH v3 8/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14ARP8 Rong Zhang
@ 2026-11-25 19:14 ` Eduard Aliman
8 siblings, 0 replies; 10+ messages in thread
From: Eduard Aliman @ 2026-11-25 19:14 UTC (permalink / raw)
To: Rong Zhang, Mark Pearson, Derek J. Clark, Hans de Goede,
Ilpo Järvinen, Gergo Koteles, Ike Panhc, Andrew Kallmeyer,
Eduard Aliman, platform-driver-x86, linux-kernel, Mahir Faisal,
stable
Hi Rong,
I tested this v3 series (patches 1-8/8) on top of Linux 7.3.4 (Fedora 45)
on my Lenovo Yoga 7 14ARP8 (82YM) without setting ymc_ec_trigger=1
manually (relying on the DMI quirk added in patch 8/8).
Folding into tablet mode now automatically turns off the keyboard
backlight, and unfolding restores it as expected.
Tested-by: Eduard Aliman <edialiman20@gmail.com>
Thanks again for adding the quirk for the 14ARP8!
Best regards,
Eduard Aliman
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-11-25 19:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 18:08 [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
2026-11-25 18:08 ` [PATCH v3 1/8] platform/x86: lenovo-ymc: Use enumeration to represent device posture Rong Zhang
2026-11-25 18:08 ` [PATCH v3 2/8] platform/x86: lenovo-ymc: Serialize WMI event handling Rong Zhang
2026-11-25 18:08 ` [PATCH v3 3/8] platform/x86: lenovo-wmi-events: Modernize " Rong Zhang
2026-11-25 18:08 ` [PATCH v3 4/8] platform/x86: lenovo-ymc: Modernize WMI driver and factor out events Rong Zhang
2026-11-25 18:08 ` [PATCH v3 5/8] platform/x86: lenovo-ymc: Refresh posture on resume Rong Zhang
2026-11-25 18:08 ` [PATCH v3 6/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Rong Zhang
2026-11-25 18:08 ` [PATCH v3 7/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14IRL8 Rong Zhang
2026-11-25 18:08 ` [PATCH v3 8/8] platform/x86: ideapad-laptop: Enable ymc_ec_trigger for Lenovo Yoga 7 14ARP8 Rong Zhang
2026-11-25 19:14 ` [PATCH v3 0/8] platform/x86: ideapad-laptop: Trigger the EC on YMC events following Windows behavior Eduard Aliman
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®