Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion module/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion module/dkms.conf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
16 changes: 13 additions & 3 deletions module/surface_gpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -284,15 +296,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 = {
Expand Down