]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ACPI / PM: Turn power resources on and off in the right order during resume
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 May 2015 02:19:49 +0000 (04:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 May 2015 21:59:54 +0000 (23:59 +0200)
commitd5eefa8280a8bb1e8aef059154bc1d63e1ac3336
treee6f4791ab3330aa83a392e5608ee6304b7fed91d
parent20dacb71ad283b9506ee7e01286a424999fb8309
ACPI / PM: Turn power resources on and off in the right order during resume

According to Section 7.2 of ACPI 6.0, power resources should
always be enabled and disabled in order given by the "resourceorder"
field of the corresponding Power Resource objects: "Power Resource
levels are enabled from low values to high values and are disabled
from high values to low values."

However, this is not what happens during system resume, because
in that case the enabling/disabling is carried out in the power
resource registration order which may not reflect the ordering
required by the platform.

For this reason, make the ordering of the global list of all
power resources in the system (used by the system resume code)
reflect the one given by the "resourceorder" attributes of the
Power Resource objects in the ACPI namespace and modify
acpi_resume_power_resources() to walk the list in the reverse
order when turning off the power resources that had been off
before the system was suspended.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/power.c