From 829d9cd11cc8769c320ff22be22270356442d37f Mon Sep 17 00:00:00 2001 From: Lucrtz Date: Sat, 21 Feb 2026 19:43:04 +0100 Subject: [PATCH 1/2] Fix remove callback signature The platform_driver remove callback changed to return void, which caused a build failure in the surface_gpe module. Therefore update the function signature accordingly. --- module/surface_gpe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/surface_gpe.c b/module/surface_gpe.c index 69c4352..b4496db 100644 --- a/module/surface_gpe.c +++ b/module/surface_gpe.c @@ -284,15 +284,13 @@ static int surface_gpe_probe(struct platform_device *pdev) return ret; } -static int surface_gpe_remove(struct platform_device *pdev) +static void surface_gpe_remove(struct platform_device *pdev) { struct surface_lid_device *lid = dev_get_drvdata(&pdev->dev); /* restore default behavior without this module */ surface_lid_enable_wakeup(&pdev->dev, false); acpi_disable_gpe(NULL, lid->gpe_number); - - return 0; } static struct platform_driver surface_gpe_driver = { From c71335a69a9bbbe5e1c27c70c69b76c5ca8a00f5 Mon Sep 17 00:00:00 2001 From: Lucrtz Date: Sat, 21 Feb 2026 19:51:05 +0100 Subject: [PATCH 2/2] Add support for Surface Pro 9 Business (Intel) --- module/Makefile | 2 +- module/dkms.conf | 2 +- module/surface_gpe.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/module/Makefile b/module/Makefile index 5893231..c205a50 100644 --- a/module/Makefile +++ b/module/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later MODULE_NAME := "surface_gpe" -MODULE_VERSION := "0.1" +MODULE_VERSION := "0.3" KVERSION := "$(shell uname -r)" KDIR := /lib/modules/$(KVERSION)/build diff --git a/module/dkms.conf b/module/dkms.conf index e60e675..3fab3b3 100644 --- a/module/dkms.conf +++ b/module/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="surface_gpe" -PACKAGE_VERSION="0.2" +PACKAGE_VERSION="0.3" CLEAN="make clean" MAKE[0]="make all KVERSION=$kernelver" BUILT_MODULE_NAME[0]="surface_gpe" diff --git a/module/surface_gpe.c b/module/surface_gpe.c index b4496db..bf8d1ed 100644 --- a/module/surface_gpe.c +++ b/module/surface_gpe.c @@ -124,6 +124,18 @@ static const struct dmi_system_id dmi_lid_device_table[] = { }, .driver_data = (void *)lid_device_props_l52, }, + { + /* + * We match for SKU here due to product name clash with the ARM + * version. + */ + .ident = "Surface Pro 9 Business", + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "Surface_Pro_9_for_Business_2038"), + }, + .driver_data = (void *)lid_device_props_l52, + }, { .ident = "Surface Book 1", .matches = {