diff options
author | Linus Torvalds <torvalds@osdl.org> | 2006-06-24 17:50:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 00:08:36 -0400 |
commit | 7c8265f51073bc8632a99de78d5fd19117ed78b7 (patch) | |
tree | 85efa2114f3765c98236152ca46d783dc1bd7d5b /include | |
parent | ceeee1fb2897651b434547eb26d93e6d2ff5a1a5 (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.h | 11 | ||||
-rw-r--r-- | include/linux/pm.h | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 8a648cd94fa..b40be6fca6f 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 | ||
58 | extern int bus_register(struct bus_type * bus); | 62 | extern 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 | ||
159 | extern int class_register(struct class *); | 166 | extern int class_register(struct class *); |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 658c1b93d5b..096fb6f754c 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -190,6 +190,7 @@ extern void device_resume(void); | |||
190 | extern suspend_disk_method_t pm_disk_mode; | 190 | extern suspend_disk_method_t pm_disk_mode; |
191 | 191 | ||
192 | extern int device_suspend(pm_message_t state); | 192 | extern int device_suspend(pm_message_t state); |
193 | extern 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)) |