mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/surface: gpe: Add support for Surface Pro 11 with Intel
@ 2026-12-03  6:46 Sergey Lebedev
  0 siblings, 0 replies; only message in thread
From: Sergey Lebedev @ 2026-12-03  6:46 UTC (permalink / raw)
  To: Maximilian Luz, Hans de Goede, Ilpo Järvinen
  Cc: Andre Gilerson, platform-driver-x86, linux-kernel

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



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

only message in thread, other threads:[~2026-12-03  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03  6:46 [PATCH] platform/surface: gpe: Add support for Surface Pro 11 with Intel Sergey Lebedev

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®