All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: mario.limonciello@amd.com, rafael@kernel.org
Cc: Xino JS1 Ni <nijs1@lenovo.com>,
	Antheas Kapenekakis <lkml@antheas.dev>,
	linux-acpi@vger.kernel.org
Subject: [PATCH] ACPI: EC: Set ec_no_wakeup for Lenovo Go S
Date: Mon, 31 Mar 2025 15:44:00 -0500	[thread overview]
Message-ID: <20250331204442.1727618-1-superm1@kernel.org> (raw)

From: Mario Limonciello <mario.limonciello@amd.com>

When AC adapter is unplugged or plugged in EC wakes from
HW sleep but APU doesn't enter back into HW sleep.

The reason this hapens is that when APU exits HW sleep the power
rails the EC controls will power up the TCON.  The TCON has a
GPIO that will be toggled during this time.  The GPIO is not marked
as a wakeup source however GPIO controller still has an unserviced
interrupt and it will block entering HW sleep again. Clearing the
GPIO doesn't help, the TCON raises it again until it's been initialized
by i2c-hid.

Fixing this would require TCON F/W changes and it's already broken
in the wild on production hardware.

To avoid triggering this issue add a quirk to avoid letting EC wake
up system at all.  The power button still works properly on this system.

Cc: Xino JS1 Ni <nijs1@lenovo.com>
Reported-by: Antheas Kapenekakis <lkml@antheas.dev>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3929
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/acpi/ec.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8db09d81918fb..3c5f34892734e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
 			DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
 		},
 	},
+	/*
+	 * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
+	 * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
+	 */
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
+		}
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
+		}
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
+		}
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
+		}
+	},
 	{ },
 };
 
-- 
2.43.0


             reply	other threads:[~2025-03-31 20:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 20:44 Mario Limonciello [this message]
2025-03-31 20:51 ` [PATCH] ACPI: EC: Set ec_no_wakeup for Lenovo Go S Antheas Kapenekakis
2025-03-31 20:53   ` Antheas Kapenekakis
2025-03-31 20:55     ` Mario Limonciello
2025-03-31 21:16       ` Antheas Kapenekakis
2025-04-01  2:40         ` Mario Limonciello
2025-04-01  9:01           ` Antheas Kapenekakis
2025-04-01 12:29             ` Mario Limonciello
2025-04-01 12:45               ` Antheas Kapenekakis
2025-04-01 14:09                 ` Mario Limonciello
2025-04-01 15:03                   ` Antheas Kapenekakis
2025-04-01 15:24                     ` Mario Limonciello
2025-04-01 18:39                       ` Antheas Kapenekakis
2025-04-01 20:54                         ` Mario Limonciello
2025-04-01 22:06                           ` Antheas Kapenekakis
2025-04-02 19:19                             ` Mario Limonciello
2025-04-02 20:37                               ` Antheas Kapenekakis
2025-04-03 19:56                                 ` Mario Limonciello
2025-04-01 14:16             ` Xino Ni
2025-04-01 14:46               ` Antheas Kapenekakis
2025-04-01 14:58                 ` Xino Ni
2025-04-01 15:05                   ` Antheas Kapenekakis
2025-04-01 12:47 ` Antheas Kapenekakis

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=20250331204442.1727618-1-superm1@kernel.org \
    --to=superm1@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lkml@antheas.dev \
    --cc=mario.limonciello@amd.com \
    --cc=nijs1@lenovo.com \
    --cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.