Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8195a655 authored by Mika Westerberg's avatar Mika Westerberg Committed by Rafael J. Wysocki
Browse files

ACPI / EC: Use ec_no_wakeup on Thinkpad X1 Carbon 6th



On this system EC interrupt triggers constantly kicking devices out of
low power states and thus blocking power management. The system also has
a PCIe root port hosting Alpine Ridge Thunderbolt controller and it
never gets a chance to go to D3cold because of this.

Since the power button works the same regardless if EC interrupt is
enabled or not during s2idle, add a quirk for this machine that sets
ec_no_wakeup=true preventing spurious wakeups.

Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ce397d21
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -2037,6 +2037,17 @@ static inline void acpi_ec_query_exit(void)
	}
}

static const struct dmi_system_id acpi_ec_no_wakeup[] = {
	{
		.ident = "Thinkpad X1 Carbon 6th",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "20KGS3JF01"),
		},
	},
	{ },
};

int __init acpi_ec_init(void)
{
	int result;
@@ -2047,6 +2058,15 @@ int __init acpi_ec_init(void)
	if (result)
		return result;

	/*
	 * Disable EC wakeup on following systems to prevent periodic
	 * wakeup from EC GPE.
	 */
	if (dmi_check_system(acpi_ec_no_wakeup)) {
		ec_no_wakeup = true;
		pr_debug("Disabling EC wakeup on suspend-to-idle\n");
	}

	/* Drivers must be started after acpi_ec_query_init() */
	dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
	/*