summaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-03-17 09:14:42 -0500
committerHans de Goede <hdegoede@redhat.com>2022-03-17 19:47:24 +0100
commit20e1d6402a71dba7ad2b81f332a3c14c7d3b939b (patch)
treea132f57ee85b97bff775d1e49fefe54a49418a07 /include/linux/acpi.h
parent6060a75e77fb05c9d54ed41cccc496dd98054b57 (diff)
downloadlinux-20e1d6402a71dba7ad2b81f332a3c14c7d3b939b.tar.bz2
ACPI / x86: Add support for LPS0 callback handler
Currenty the latest thing run during a suspend to idle attempt is the LPS0 `prepare_late` callback and the earliest thing is the `resume_early` callback. There is a desire for the `amd-pmc` driver to suspend later in the suspend process (ideally the very last thing), so create a callback that it or any other driver can hook into to do this. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20220317141445.6498-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6274758648e3..47c16cdc8e0e 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1023,7 +1023,15 @@ void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state,
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
u32 val_a, u32 val_b);
-
+#ifdef CONFIG_X86
+struct acpi_s2idle_dev_ops {
+ struct list_head list_node;
+ void (*prepare)(void);
+ void (*restore)(void);
+};
+int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
+void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
+#endif /* CONFIG_X86 */
#ifndef CONFIG_IA64
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
#else