WSL2-Linux-Kernel/kernel/power
Rafael J. Wysocki 6a7c7eaf71 PM/Suspend: Introduce two new platform callbacks to avoid breakage
Commit 900af0d973 (PM: Change suspend
code ordering) changed the ordering of suspend code in such a way
that the platform .prepare() callback is now executed after the
device drivers' late suspend callbacks have run.  Unfortunately, this
turns out to break ARM platforms that need to talk via I2C to power
control devices during the .prepare() callback.

For this reason introduce two new platform suspend callbacks,
.prepare_late() and .wake(), that will be called just prior to
disabling non-boot CPUs and right after bringing them back on line,
respectively, and use them instead of .prepare() and .finish() for
ACPI suspend.  Make the PM core execute the .prepare() and .finish()
platform suspend callbacks where they were executed previously (that
is, right after calling the regular suspend methods provided by
device drivers and right before executing their regular resume
methods, respectively).

It is not necessary to make analogous changes to the hibernation
code and data structures at the moment, because they are only used
by ACPI platforms.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Len Brown <len.brown@intel.com>
2009-04-19 20:08:42 +02:00
..
Kconfig PM_TEST_SUSPEND should depend on RTC_CLASS, not RTC_LIB 2008-11-01 12:40:38 -07:00
Makefile PM: fix build for CONFIG_PM unset 2009-02-21 14:17:17 -08:00
console.c PM: Wait for console in resume 2009-02-21 14:17:17 -08:00
disk.c PM/Hibernate: Wait for SCSI devices scan to complete during resume 2009-04-13 11:37:07 -07:00
main.c PM/Suspend: Introduce two new platform callbacks to avoid breakage 2009-04-19 20:08:42 +02:00
power.h [PATCH] propagate mode through swsusp_close() 2008-10-21 07:49:02 -04:00
poweroff.c cpumask: convert rest of files in kernel/ 2009-01-01 10:12:28 +10:30
process.c container freezer: skip frozen cgroups during power management resume 2008-10-20 08:52:34 -07:00
snapshot.c mm: introduce for_each_populated_zone() macro 2009-04-01 08:59:11 -07:00
swap.c swap: Remove code handling bio_alloc failure with __GFP_WAIT 2009-04-15 12:10:13 +02:00
swsusp.c pm: rework includes, remove arch ifdefs 2009-04-01 08:59:16 -07:00
user.c PM/Hibernate: Wait for SCSI devices scan to complete during resume 2009-04-13 11:37:07 -07:00