diff mbox

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

Message ID 20180618111716.58910-1-mika.westerberg@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Mika Westerberg June 18, 2018, 11:17 a.m. UTC
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 change 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: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/acpi/ec.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Rafael J. Wysocki June 19, 2018, 9:08 a.m. UTC | #1
On Monday, June 18, 2018 1:17:16 PM CEST Mika Westerberg wrote:
> 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 change 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: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>  drivers/acpi/ec.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index 30a572956557..1285e070e968 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -2031,6 +2031,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;
> @@ -2041,6 +2052,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);
>  	/*
> 

Applied, thanks!


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 30a572956557..1285e070e968 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2031,6 +2031,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;
@@ -2041,6 +2052,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);
 	/*