mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Lebedev <lsa.uz@pm.me>
To: "Maximilian Luz" <luzmaximilian@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Andre Gilerson <andre.gilerson@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 11 with Intel
Date: Thu, 03 Dec 2026 06:46:10 +0000	[thread overview]
Message-ID: <20261203064605.32265-1-lsa.uz@pm.me> (raw)

Add the lid GPE used by the Surface Pro 11th Edition with Intel. Its
_L2E handler notifies LID0; without this entry the tablet does not wake
from suspend when the Type Cover is opened.

André Gilerson found this GPE first and carries the same entry in his
linux-surface kernel:
https://github.com/AndreGilerson/linux-surface-kernel/commit/c0c80569eaa0

Signed-off-by: Sergey Lebedev <lsa.uz@pm.me>
---
Tested on the Surface Pro for Business 11th Edition with Intel, Ubuntu
7.0.0-44 with surface_gpe from v7.0 plus this entry. The SAM's own wake
sources were disabled for the test, so only the GPE could wake it.
Without the entry, opening the cover did not wake it from s2idle,
although gpe2E counted. With it, the open woke it: "Triggering wakeup
from IRQ 9", "ACPI non-EC GPE wakeup".

Tool use, per Documentation/process/generated-content.rst (Assisted-by
tags in commits were dropped in 7.4-rc1):

* My contributions to this series were prepared with Claude Code
  (claude-opus-5-5); work by others in it is their own.
* This replaces any Assisted-by tags in earlier versions.

 drivers/platform/surface/surface_gpe.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/platform/surface/surface_gpe.c b/drivers/platform/surface/surface_gpe.c
index 60c19283c79..04de8644102 100644
--- a/drivers/platform/surface/surface_gpe.c
+++ b/drivers/platform/surface/surface_gpe.c
@@ -27,6 +27,11 @@ static const struct property_entry lid_device_props_l17[] = {
 	{},
 };
 
+static const struct property_entry lid_device_props_l2E[] = {
+	PROPERTY_ENTRY_U32("gpe", 0x2E),
+	{},
+};
+
 static const struct property_entry lid_device_props_l4B[] = {
 	PROPERTY_ENTRY_U32("gpe", 0x4B),
 	{},
@@ -192,6 +197,15 @@ static const struct dmi_system_id dmi_lid_device_table[] = {
 		},
 		.driver_data = (void *)lid_device_props_l4B,
 	},
+	{
+		.ident = "Surface Pro 11 (Intel)",
+		.matches = {
+			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_NAME,
+					"Surface Pro for Business 11th Edition with Intel"),
+		},
+		.driver_data = (void *)lid_device_props_l2E,
+	},
 	{ }
 };
 
-- 
2.54.0



                 reply	other threads:[~2026-12-03  6:46 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=20261203064605.32265-1-lsa.uz@pm.me \
    --to=lsa.uz@pm.me \
    --cc=andre.gilerson@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=platform-driver-x86@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®