From ade5ee8b807920270a77904ddf83ac480ab0d61b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 4 Sep 2018 10:14:37 -0600 Subject: [PATCH 1/5] Return ENODEV when model is not matched --- system76.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system76.c b/system76.c index ea91bad..e47460d 100644 --- a/system76.c +++ b/system76.c @@ -264,7 +264,10 @@ static struct dmi_system_id s76_dmi_table[] __initdata = { MODULE_DEVICE_TABLE(dmi, s76_dmi_table); static int __init s76_init(void) { - dmi_check_system(s76_dmi_table); + if (!dmi_check_system(s76_dmi_table) > 0) { + S76_INFO("Model does not utilize this driver"); + return -ENODEV; + } if (!wmi_has_guid(S76_EVENT_GUID)) { S76_INFO("No known WMI event notification GUID found\n"); From 7c631d4a2a8b2b6a5531cffb4950a53f0d184736 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 4 Sep 2018 10:23:57 -0600 Subject: [PATCH 2/5] 1.0.0 release --- debian/changelog | 6 ++++++ system76.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e394053..dda2b83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +system76-dkms (1.0.0) bionic; urgency=medium + + * 1.0.0 release + + -- Jeremy Soller Tue, 04 Sep 2018 10:23:09 -0600 + system76-dkms (0.0.3) bionic; urgency=medium * Add oryp4-b diff --git a/system76.c b/system76.c index e47460d..713ec44 100644 --- a/system76.c +++ b/system76.c @@ -300,4 +300,4 @@ module_exit(s76_exit); MODULE_AUTHOR("Jeremy Soller "); MODULE_DESCRIPTION("System76 laptop driver"); MODULE_LICENSE("GPL"); -MODULE_VERSION("0.0.3"); +MODULE_VERSION("1.0.0"); From 5a6b7b4f12340dd1aff47634f0a92a7d615237ba Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 5 Sep 2018 08:27:30 -0600 Subject: [PATCH 3/5] Begin matching galp2 and serw11 when System76 is the BIOS vendor --- system76.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/system76.c b/system76.c index 713ec44..1d750e3 100644 --- a/system76.c +++ b/system76.c @@ -241,6 +241,19 @@ static int __init s76_dmi_matched(const struct dmi_system_id *id) { return 1; } +// Devices that did launch with DKMS support but have been updated with it +#define DMI_TABLE_LEGACY(PRODUCT) { \ + .ident = "System76 " PRODUCT, \ + .matches = { \ + DMI_MATCH(DMI_SYS_VENDOR, "System76"), \ + DMI_MATCH(DMI_PRODUCT_VERSION, PRODUCT), \ + DMI_MATCH(DMI_BIOS_VENDOR, "System76"), \ + }, \ + .callback = s76_dmi_matched, \ + .driver_data = NULL, \ +} + +// Devices that launched with DKMS support #define DMI_TABLE(PRODUCT) { \ .ident = "System76 " PRODUCT, \ .matches = { \ @@ -252,6 +265,8 @@ static int __init s76_dmi_matched(const struct dmi_system_id *id) { } static struct dmi_system_id s76_dmi_table[] __initdata = { + DMI_TABLE_LEGACY("galp2"), + DMI_TABLE_LEGACY("serw11"), DMI_TABLE("galp3-b"), DMI_TABLE("gaze13"), DMI_TABLE("kudu5"), From 54937b859217bde2d59bd5267428f270c4271050 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 5 Sep 2018 08:28:13 -0600 Subject: [PATCH 4/5] Fix dmi check logic --- system76.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system76.c b/system76.c index 1d750e3..be5c6bc 100644 --- a/system76.c +++ b/system76.c @@ -279,7 +279,7 @@ static struct dmi_system_id s76_dmi_table[] __initdata = { MODULE_DEVICE_TABLE(dmi, s76_dmi_table); static int __init s76_init(void) { - if (!dmi_check_system(s76_dmi_table) > 0) { + if (!dmi_check_system(s76_dmi_table)) { S76_INFO("Model does not utilize this driver"); return -ENODEV; } From 2b4bb890cb9377ba4c5ad216ee165b87e40ed93a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 6 Sep 2018 09:35:52 -0600 Subject: [PATCH 5/5] Reset touchpad lock on resume --- system76.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/system76.c b/system76.c index be5c6bc..b64f4bf 100644 --- a/system76.c +++ b/system76.c @@ -216,11 +216,16 @@ static int s76_resume(struct platform_device *dev) { msleep(2000); + ap_led_resume(); + kb_led_resume(); + // Enable hotkey support s76_wmbb(0x46, 0, NULL); - ap_led_resume(); - kb_led_resume(); + // Enable touchpad lock + i8042_lock_chip(); + i8042_command(NULL, 0x97); + i8042_unlock_chip(); return 0; }