summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorLinus Torvalds2006-06-24 23:50:29 +0200
committerGreg Kroah-Hartman2006-09-26 06:08:36 +0200
commit7c8265f51073bc8632a99de78d5fd19117ed78b7 (patch)
tree85efa2114f3765c98236152ca46d783dc1bd7d5b /include/linux/device.h
parentSYSFS: allow sysfs_create_link to create symlinks in the root of sysfs (diff)
downloadkernel-qcow2-linux-7c8265f51073bc8632a99de78d5fd19117ed78b7.tar.gz
kernel-qcow2-linux-7c8265f51073bc8632a99de78d5fd19117ed78b7.tar.xz
kernel-qcow2-linux-7c8265f51073bc8632a99de78d5fd19117ed78b7.zip
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 8a648cd94fa9..b40be6fca6fa 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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 *);