aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
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')
-rw-r--r--include/linux/device.h11
-rw-r--r--include/linux/pm.h1
2 files changed, 10 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 *);
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 658c1b93d5bb..096fb6f754cf 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -190,6 +190,7 @@ extern void device_resume(void);
190extern suspend_disk_method_t pm_disk_mode; 190extern suspend_disk_method_t pm_disk_mode;
191 191
192extern int device_suspend(pm_message_t state); 192extern int device_suspend(pm_message_t state);
193extern int device_prepare_suspend(pm_message_t state);
193 194
194#define device_set_wakeup_enable(dev,val) \ 195#define device_set_wakeup_enable(dev,val) \
195 ((dev)->power.should_wakeup = !!(val)) 196 ((dev)->power.should_wakeup = !!(val))