diff options
Diffstat (limited to 'include/linux/platform_device.h')
| -rw-r--r-- | include/linux/platform_device.h | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 744942c95fec..ede1a80e3358 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -150,9 +150,6 @@ extern struct platform_device *platform_create_bundle(struct platform_driver *dr | |||
| 150 | struct resource *res, unsigned int n_res, | 150 | struct resource *res, unsigned int n_res, |
| 151 | const void *data, size_t size); | 151 | const void *data, size_t size); |
| 152 | 152 | ||
| 153 | extern const struct dev_pm_ops * platform_bus_get_pm_ops(void); | ||
| 154 | extern void platform_bus_set_pm_ops(const struct dev_pm_ops *pm); | ||
| 155 | |||
| 156 | /* early platform driver interface */ | 153 | /* early platform driver interface */ |
| 157 | struct early_platform_driver { | 154 | struct early_platform_driver { |
| 158 | const char *class_str; | 155 | const char *class_str; |
| @@ -205,4 +202,64 @@ static inline char *early_platform_driver_setup_func(void) \ | |||
| 205 | } | 202 | } |
| 206 | #endif /* MODULE */ | 203 | #endif /* MODULE */ |
| 207 | 204 | ||
| 205 | #ifdef CONFIG_PM_SLEEP | ||
| 206 | extern int platform_pm_prepare(struct device *dev); | ||
| 207 | extern void platform_pm_complete(struct device *dev); | ||
| 208 | #else | ||
| 209 | #define platform_pm_prepare NULL | ||
| 210 | #define platform_pm_complete NULL | ||
| 211 | #endif | ||
| 212 | |||
| 213 | #ifdef CONFIG_SUSPEND | ||
| 214 | extern int platform_pm_suspend(struct device *dev); | ||
| 215 | extern int platform_pm_suspend_noirq(struct device *dev); | ||
| 216 | extern int platform_pm_resume(struct device *dev); | ||
| 217 | extern int platform_pm_resume_noirq(struct device *dev); | ||
| 218 | #else | ||
| 219 | #define platform_pm_suspend NULL | ||
| 220 | #define platform_pm_resume NULL | ||
| 221 | #define platform_pm_suspend_noirq NULL | ||
| 222 | #define platform_pm_resume_noirq NULL | ||
| 223 | #endif | ||
| 224 | |||
| 225 | #ifdef CONFIG_HIBERNATE_CALLBACKS | ||
| 226 | extern int platform_pm_freeze(struct device *dev); | ||
| 227 | extern int platform_pm_freeze_noirq(struct device *dev); | ||
| 228 | extern int platform_pm_thaw(struct device *dev); | ||
| 229 | extern int platform_pm_thaw_noirq(struct device *dev); | ||
| 230 | extern int platform_pm_poweroff(struct device *dev); | ||
| 231 | extern int platform_pm_poweroff_noirq(struct device *dev); | ||
| 232 | extern int platform_pm_restore(struct device *dev); | ||
| 233 | extern int platform_pm_restore_noirq(struct device *dev); | ||
| 234 | #else | ||
| 235 | #define platform_pm_freeze NULL | ||
| 236 | #define platform_pm_thaw NULL | ||
| 237 | #define platform_pm_poweroff NULL | ||
| 238 | #define platform_pm_restore NULL | ||
| 239 | #define platform_pm_freeze_noirq NULL | ||
| 240 | #define platform_pm_thaw_noirq NULL | ||
| 241 | #define platform_pm_poweroff_noirq NULL | ||
| 242 | #define platform_pm_restore_noirq NULL | ||
| 243 | #endif | ||
| 244 | |||
| 245 | #ifdef CONFIG_PM_SLEEP | ||
| 246 | #define USE_PLATFORM_PM_SLEEP_OPS \ | ||
| 247 | .prepare = platform_pm_prepare, \ | ||
| 248 | .complete = platform_pm_complete, \ | ||
| 249 | .suspend = platform_pm_suspend, \ | ||
| 250 | .resume = platform_pm_resume, \ | ||
| 251 | .freeze = platform_pm_freeze, \ | ||
| 252 | .thaw = platform_pm_thaw, \ | ||
| 253 | .poweroff = platform_pm_poweroff, \ | ||
| 254 | .restore = platform_pm_restore, \ | ||
| 255 | .suspend_noirq = platform_pm_suspend_noirq, \ | ||
| 256 | .resume_noirq = platform_pm_resume_noirq, \ | ||
| 257 | .freeze_noirq = platform_pm_freeze_noirq, \ | ||
| 258 | .thaw_noirq = platform_pm_thaw_noirq, \ | ||
| 259 | .poweroff_noirq = platform_pm_poweroff_noirq, \ | ||
| 260 | .restore_noirq = platform_pm_restore_noirq, | ||
| 261 | #else | ||
| 262 | #define USE_PLATFORM_PM_SLEEP_OPS | ||
| 263 | #endif | ||
| 264 | |||
| 208 | #endif /* _PLATFORM_DEVICE_H_ */ | 265 | #endif /* _PLATFORM_DEVICE_H_ */ |
