aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/sleep.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 6804ddab3052..8082871b409a 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -160,6 +160,14 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
160 return 0; 160 return 0;
161} 161}
162 162
163static bool acpi_sleep_no_lps0;
164
165static int __init init_no_lps0(const struct dmi_system_id *d)
166{
167 acpi_sleep_no_lps0 = true;
168 return 0;
169}
170
163static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { 171static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
164 { 172 {
165 .callback = init_old_suspend_ordering, 173 .callback = init_old_suspend_ordering,
@@ -343,6 +351,19 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
343 DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), 351 DMI_MATCH(DMI_PRODUCT_NAME, "80E3"),
344 }, 352 },
345 }, 353 },
354 /*
355 * https://bugzilla.kernel.org/show_bug.cgi?id=196907
356 * Some Dell XPS13 9360 cannot do suspend-to-idle using the Low Power
357 * S0 Idle firmware interface.
358 */
359 {
360 .callback = init_no_lps0,
361 .ident = "Dell XPS13 9360",
362 .matches = {
363 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
364 DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
365 },
366 },
346 {}, 367 {},
347}; 368};
348 369
@@ -485,6 +506,7 @@ static void acpi_pm_end(void)
485} 506}
486#else /* !CONFIG_ACPI_SLEEP */ 507#else /* !CONFIG_ACPI_SLEEP */
487#define acpi_target_sleep_state ACPI_STATE_S0 508#define acpi_target_sleep_state ACPI_STATE_S0
509#define acpi_sleep_no_lps0 (false)
488static inline void acpi_sleep_dmi_check(void) {} 510static inline void acpi_sleep_dmi_check(void) {}
489#endif /* CONFIG_ACPI_SLEEP */ 511#endif /* CONFIG_ACPI_SLEEP */
490 512
@@ -863,6 +885,12 @@ static int lps0_device_attach(struct acpi_device *adev,
863 if (lps0_device_handle) 885 if (lps0_device_handle)
864 return 0; 886 return 0;
865 887
888 if (acpi_sleep_no_lps0) {
889 acpi_handle_info(adev->handle,
890 "Low Power S0 Idle interface disabled\n");
891 return 0;
892 }
893
866 if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) 894 if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
867 return 0; 895 return 0;
868 896