diff options
Diffstat (limited to 'include/linux/pm.h')
| -rw-r--r-- | include/linux/pm.h | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index e4c795f71cea..3017bdef5f03 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -186,9 +186,46 @@ static inline void pm_dev_idle(struct pm_dev *dev) {} #endif /* CONFIG_PM */ + +/* + * Callbacks for platform drivers to implement. + */ extern void (*pm_idle)(void); extern void (*pm_power_off)(void); +enum { + PM_SUSPEND_ON, + PM_SUSPEND_STANDBY, + PM_SUSPEND_MEM, + PM_SUSPEND_DISK, + PM_SUSPEND_MAX, +}; + +enum { + PM_DISK_FIRMWARE = 1, + PM_DISK_PLATFORM, + PM_DISK_SHUTDOWN, + PM_DISK_REBOOT, + PM_DISK_MAX, +}; + + +struct pm_ops { + u32 pm_disk_mode; + int (*prepare)(u32 state); + int (*enter)(u32 state); + int (*finish)(u32 state); +}; + +extern void pm_set_ops(struct pm_ops *); + +extern int pm_suspend(u32 state); + + +/* + * Device power management + */ + struct device; struct dev_pm_info { @@ -203,10 +240,10 @@ struct dev_pm_info { extern void device_pm_set_parent(struct device * dev, struct device * parent); -extern int device_pm_suspend(u32 state); -extern int device_pm_power_down(u32 state); -extern void device_pm_power_up(void); -extern void device_pm_resume(void); +extern int device_suspend(u32 state); +extern int device_power_down(u32 state); +extern void device_power_up(void); +extern void device_resume(void); #endif /* __KERNEL__ */ |
