aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-06-24 17:50:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:36 -0400
commit7c8265f51073bc8632a99de78d5fd19117ed78b7 (patch)
tree85efa2114f3765c98236152ca46d783dc1bd7d5b /include/linux/device.h
parentceeee1fb2897651b434547eb26d93e6d2ff5a1a5 (diff)
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 {
51 int (*probe)(struct device * dev); 51 int (*probe)(struct device * dev);
52 int (*remove)(struct device * dev); 52 int (*remove)(struct device * dev);
53 void (*shutdown)(struct device * dev); 53 void (*shutdown)(struct device * dev);
54 int (*suspend)(struct device * dev, pm_message_t state); 54
55 int (*resume)(struct device * dev); 55 int (*suspend_prepare)(struct device * dev, pm_message_t state);
56 int (*suspend)(struct device * dev, pm_message_t state);
57 int (*suspend_late)(struct device * dev, pm_message_t state);
58 int (*resume_early)(struct device * dev);
59 int (*resume)(struct device * dev);
56}; 60};
57 61
58extern int bus_register(struct bus_type * bus); 62extern int bus_register(struct bus_type * bus);
@@ -154,6 +158,9 @@ struct class {
154 158
155 void (*release)(struct class_device *dev); 159 void (*release)(struct class_device *dev);
156 void (*class_release)(struct class *class); 160 void (*class_release)(struct class *class);
161
162 int (*suspend)(struct device *, pm_message_t state);
163 int (*resume)(struct device *);
157}; 164};
158 165
159extern int class_register(struct class *); 166extern int class_register(struct class *);