Skip to contentSkip to conversation

ACPI: save NVS memory for Lenovo G40-45

PATCH Applied Manyi Li 2 participants 2 messages Jun 22, 2022 – Jun 29, 2022 ACPI

lore
Share & tools
lore

Manyi Li

author
#0 lore raw

PATCH 1/1 ACPI: save NVS memory for Lenovo G40-45

[821d6f0359b0614792ab8e2fb93b503e25a65079] is to make machines produced from 2012 to now not saving NVS region to accelerate S3.

But, Lenovo G40-45, a platform released in 2015, still needs NVS memory saving during S3. A quirk is introduced for this platform.

---
 drivers/acpi/sleep.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/sleep.c +8 -0
index 04ea1569df78..974746e6e59d 100644
@@ -360,6 +360,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
 		},
 	},
+	{
+	.callback = init_nvs_save_s3,
+	.ident = "Lenovo G40-45",
+	.matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "80E1"),
+		},
+	},
 	/*
 	 * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
 	 * the Low Power S0 Idle firmware interface (see
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 22 lines · Manyi Li

[821d6f0359b0614792ab8e2fb93b503e25a65079] is to make machines produced from 2012 to now not saving NVS region to accelerate S3.

But, Lenovo G40-45, a platform released in 2015, still needs NVS memory saving during S3. A quirk is introduced for this platform.

---
 drivers/acpi/sleep.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/sleep.c +2 -0
index 04ea1569df78..974746e6e59d 100644
@@ -360,6 +360,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
                DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
                },
        },
+       {
+       .callback = init_nvs_save_s3,

drivers/acpi/sleep.c static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {

Quoted 10 lines
drivers/acpi/sleep.c +6 -1
+       .ident = "Lenovo G40-45",
+       .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_NAME, "80E1"),
+               },
+       },
        /*
         * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
         * the Low Power S0 Idle firmware interface (see
--

Applied as 5.20 material, thanks!