PM: define PM_EVENT_PRETHAW
authorDavid Brownell <david-b@pacbell.net>
Tue, 15 Aug 2006 06:11:04 +0000 (23:11 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 04:08:37 +0000 (21:08 -0700)
commit82bb67f2c1f9ef438c56ac24e7dca027fe7289b5
treee0531466b19295129692da81bdff3538ab3621b3
parent8b4b8a24e4e49dc9fe36d4d079f6d2c23f942b03
PM: define PM_EVENT_PRETHAW

This adds a new pm_message_t event type to use when preparing to restore a
swsusp snapshot.  Devices that have been initialized by Linux after resume
(rather than left in power-up-reset state) may need to be reset; this new
event type give drivers the chance to do that.

The drivers that will care about this are those which understand more hardware
states than just "on" and "reset", relying on hardware state during resume()
methods to be either the state left by the preceding suspend(), or a
power-lost reset.  The best current example of this class of drivers are USB
host controller drivers, which currently do not work through swsusp when
they're statically linked.

When the swsusp freeze/thaw mechanism kicks in, a troublesome third state
could exist: one state set up by a different kernel instance, before a
snapshot image is resumed.  This mechanism lets drivers prevent that state.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/pm.h