diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-01-08 09:42:13 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-01-08 09:42:13 +0100 |
commit | 21654ae81104cc7e6106c0c6d2eb077f65722492 (patch) | |
tree | 06dc992e1e7976a39be2b9814a42239915efb475 /drivers/acpi | |
parent | 03a611cc2962c4a907568555c52d110395ab38cd (diff) | |
parent | d77abe80efb959aa038165a87df4327c90a26447 (diff) |
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/sleep.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 808484d11209..f9cba0e648c5 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -84,11 +84,16 @@ static int acpi_sleep_prepare(u32 acpi_state) return 0; } +static u8 max_sleep_state = -1; + bool acpi_sleep_state_supported(u8 sleep_state) { acpi_status status; u8 type_a, type_b; + if (sleep_state > max_sleep_state) + return false; + status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b); return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware || (acpi_gbl_FADT.sleep_control.address @@ -165,6 +170,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d) return 0; } +static int __init init_nosleep(const struct dmi_system_id *d) +{ + pr_info("Disabling ACPI suspend\n"); + max_sleep_state = 0; + return 0; +} + bool acpi_sleep_default_s3; static int __init init_default_s3(const struct dmi_system_id *d) @@ -397,6 +409,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"), }, }, + { + .callback = init_nosleep, + .ident = "samus", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), + DMI_MATCH(DMI_PRODUCT_NAME, "Samus"), + }, + }, {}, }; |