]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: PM: Turn off unused wakeup power resources
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 Oct 2021 17:01:28 +0000 (19:01 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Oct 2021 17:35:39 +0000 (19:35 +0200)
commit293999863a724a49284598a885409a60d563382a
tree0f6f75f510f81b568f3e701e189a2871c8b39efe
parent9184100d42ed34e5b8d34e62c6a6a9f44d34417a
ACPI: PM: Turn off unused wakeup power resources

If an ACPI power resource is found to be "on" during the
initialization of the list of wakeup power resources of a device,
it is reference counted and its wakeup_enabled flag is set, which is
problematic if the deivce in question is the only user of the given
power resource, it is never runtime-suspended and it is not allowed
to wake up the system from sleep, because in that case the given
power resource will stay "on" until the system reboots and energy
will be wasted.

It is better to simply turn off wakeup power resources that are "on"
during the initialization unless their reference counters are not
zero, because that may be the only opportunity to prevent them from
staying in the "on" state all the time.

Fixes: 04a130a9c431 ("ACPI / PM: Take unusual configurations of power resources into account")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/power.c