summaryrefslogtreecommitdiff
path: root/drivers/acpi/internal.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-09 16:22:09 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-13 19:57:01 +0200
commitc10383e8ddf4810b9a5c1595404c2724d925a0a6 (patch)
tree12f0353e5aa3b433b7a7e89d058f2d857f46a018 /drivers/acpi/internal.h
parent64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc (diff)
ACPI: scan: Release PM resources blocked by unused objects
On some systems the ACPI namespace contains device objects that are not used in certain configurations of the system. If they start off in the D0 power state configuration, they will stay in it until the system reboots, because of the lack of any mechanism possibly causing their configuration to change. If that happens, they may prevent some power resources from being turned off or generally they may prevent the platform from getting into the deepest low-power states thus causing some energy to be wasted. Address this issue by changing the configuration of unused ACPI device objects to the D3cold power state one after carrying out the ACPI-based enumeration of devices. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214091 Link: https://lore.kernel.org/linux-acpi/20211007205126.11769-1-mario.limonciello@amd.com/ Reported-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Diffstat (limited to 'drivers/acpi/internal.h')
-rw-r--r--drivers/acpi/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index d91b560e8867..8fbdc172864b 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -117,6 +117,7 @@ bool acpi_device_is_battery(struct acpi_device *adev);
bool acpi_device_is_first_physical_node(struct acpi_device *adev,
const struct device *dev);
int acpi_bus_register_early_device(int type);
+int acpi_dev_turn_off_if_unused(struct device *dev, void *not_used);
/* --------------------------------------------------------------------------
Device Matching and Notification