mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amir Sabbaghi <asaba90@gmail.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Amir Sabbaghi <asaba90@gmail.com>,
	stable@vger.kernel.org
Subject: [PATCH] ACPI: EC: Add quirk for Lenovo Yoga S740-14IIL
Date: Sat,  7 Nov 2026 20:15:53 +0000	[thread overview]
Message-ID: <20261107201553.9268-1-asaba90@gmail.com> (raw)

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


                 reply	other threads:[~2026-11-07 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261107201553.9268-1-asaba90@gmail.com \
    --to=asaba90@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --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®