mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-12 09:32:44 +00:00
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:
parent
ceeee1fb28
commit
7c8265f510
5 changed files with 130 additions and 36 deletions
|
@ -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 *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue