Suspend infrastructure cleanup and extension

Allow devices to participate in the suspend process more intimately,
in particular, allow the final phase (with interrupts disabled) to
also be open to normal devices, not just system devices.

Also, allow classes to participate in device suspend.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Linus Torvalds 2006-06-24 14:50:29 -07:00 committed by Greg Kroah-Hartman
parent ceeee1fb28
commit 7c8265f510
5 changed files with 130 additions and 36 deletions

View file

@ -51,8 +51,12 @@ struct bus_type {
int (*probe)(struct device * dev);
int (*remove)(struct device * dev);
void (*shutdown)(struct device * dev);
int (*suspend)(struct device * dev, pm_message_t state);
int (*resume)(struct device * dev);
int (*suspend_prepare)(struct device * dev, pm_message_t state);
int (*suspend)(struct device * dev, pm_message_t state);
int (*suspend_late)(struct device * dev, pm_message_t state);
int (*resume_early)(struct device * dev);
int (*resume)(struct device * dev);
};
extern int bus_register(struct bus_type * bus);
@ -154,6 +158,9 @@ struct class {
void (*release)(struct class_device *dev);
void (*class_release)(struct class *class);
int (*suspend)(struct device *, pm_message_t state);
int (*resume)(struct device *);
};
extern int class_register(struct class *);