linux/arch/arm/mach-at91
Rafael J. Wysocki 2391dae3e3 PM: introduce set_target method in pm_ops
Commit 52ade9b3b9 changed the suspend code
ordering to execute pm_ops->prepare() after the device model per-device
.suspend() calls in order to fix some ACPI-related issues.  Unfortunately, it
broke the at91 platform which assumed that pm_ops->prepare() would be called
before suspending devices.

at91 used pm_ops->prepare() to get notified of the target system sleep state,
so that it could use this information while suspending devices.  However, with
the current suspend code ordering pm_ops->prepare() is called too late for
this purpose.  Thus, at91 needs an additional method in 'struct pm_ops' that
will be used for notifying the platform of the target system sleep state.
Moreover, in the future such a method will also be needed by ACPI.

This patch adds the .set_target() method to 'struct pm_ops' and makes the
suspend code call it, if implemented, before executing the device model
per-device .suspend() calls.  It also modifies the at91 code to use
pm_ops->set_target() instead of pm_ops->prepare().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-01 12:29:44 -07:00
..
Kconfig
Makefile
Makefile.boot
at91rm9200.c
at91rm9200_devices.c
at91rm9200_time.c
at91sam9rl.c
at91sam9rl_devices.c
at91sam926x_time.c
at91sam9260.c
at91sam9260_devices.c
at91sam9261.c
at91sam9261_devices.c
at91sam9263.c
at91sam9263_devices.c
board-1arm.c
board-carmeva.c
board-csb337.c
board-csb637.c
board-dk.c
board-eb9200.c
board-ek.c
board-kafa.c
board-kb9202.c
board-picotux200.c
board-sam9rlek.c
board-sam9260ek.c
board-sam9261ek.c
board-sam9263ek.c
clock.c
clock.h
generic.h
gpio.c
irq.c
leds.c
pm.c PM: introduce set_target method in pm_ops 2007-07-01 12:29:44 -07:00