mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI: EC: Add quirk for Lenovo Yoga S740-14IIL
@ 2026-11-07 20:15 Amir Sabbaghi
  0 siblings, 0 replies; only message in thread
From: Amir Sabbaghi @ 2026-11-07 20:15 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Len Brown, linux-acpi, linux-kernel, Amir Sabbaghi, stable

On the Lenovo Yoga S740-14IIL (81RS, BIOS BYCN29WW), the ECDT
advertises GPE 0x6E for the embedded controller, but the EC is
actually wired to GPE 0x43, which is what the DSDT EC0 device's
_GPE method returns. Since the ECDT and DSDT EC share the same
command/data ports (0x66/0x62), acpi_ec_add() keeps the ECDT GPE,
so no EC events are ever handled:

  ACPI: EC: GPE=0x6e

  /sys/firmware/acpi/interrupts/gpe6E:  0  EN  enabled   unmasked
  /sys/firmware/acpi/interrupts/gpe43:  0  EN STS invalid unmasked

GPE 0x6E never fires, while GPE 0x43 is left enabled with its status
bit set and no handler, so each SCI it raises is counted in sci_not
(about 7/s, 1.4 million over 55 hours of uptime). As a result, EC
query events are lost: the brightness hotkeys and several other Fn
hotkeys produce no input events at all, and battery/AC notifications/
laptop lid event are not delivered.

Add the machine to ec_dmi_table so that the DSDT GPE is used.

Tested by overriding the ECDT through the initrd with a copy whose
GPE was changed from 0x6E to 0x43, and later by applying this patch
and removing the override. With the fix the kernel reports
"ACPI: EC: GPE=0x43", gpe43 receives events, sci_not stays at 0,
and the brightness and other Fn hotkeys work.

Cc: stable@vger.kernel.org
Signed-off-by: Amir Sabbaghi <asaba90@gmail.com>
---
 drivers/acpi/ec.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index a89f10256..7c0643d5d 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2007,6 +2007,16 @@ static const struct dmi_system_id ec_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "HP 250 G7 Notebook PC"),
 		},
 	},
+	{
+		/*
+		 * Lenovo Yoga S740-14IIL
+		 */
+		.callback = ec_honor_dsdt_gpe,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga S740-14IIL"),
+		},
+	},
 	{
 		/*
 		 * Samsung hardware
-- 
2.54.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-07 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 20:15 [PATCH] ACPI: EC: Add quirk for Lenovo Yoga S740-14IIL Amir Sabbaghi

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®