diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-08-18 22:40:07 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-21 21:28:20 +0300 |
commit | 1c2a66d47de36608551d73562d01bb4afcf1d61a (patch) | |
tree | 0cd888ff33c59fef4d7af4473475f28317b6524b /include/linux/acpi.h | |
parent | 41233988112f0f5fb015172a8db68a3c052aedda (diff) | |
download | linux-1c2a66d47de36608551d73562d01bb4afcf1d61a.tar.xz |
ACPI: x86: s2idle: Add a function to get LPS0 constraint for a device
Other parts of the kernel may use LPS0 constraints information to make
decisions on what power state to put a device into.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[ rjw: Rewrite kerneldoc, rearrange if () statement, edit subject and
changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 6b4966e5d7b1..9e2a15dd33e4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1109,6 +1109,12 @@ struct acpi_s2idle_dev_ops { }; int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg); void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg); +int acpi_get_lps0_constraint(struct acpi_device *adev); +#else /* CONFIG_SUSPEND && CONFIG_X86 */ +static inline int acpi_get_lps0_constraint(struct device *dev) +{ + return ACPI_STATE_UNKNOWN; +} #endif /* CONFIG_SUSPEND && CONFIG_X86 */ #ifndef CONFIG_IA64 void arch_reserve_mem_area(acpi_physical_address addr, size_t size); |