diff options
Diffstat (limited to 'include/linux/pm_runtime.h')
| -rw-r--r-- | include/linux/pm_runtime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 370ce0a6fe4a..6e81888c6222 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -28,6 +28,11 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status); | |||
| 28 | extern int pm_runtime_barrier(struct device *dev); | 28 | extern int pm_runtime_barrier(struct device *dev); |
| 29 | extern void pm_runtime_enable(struct device *dev); | 29 | extern void pm_runtime_enable(struct device *dev); |
| 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); | 30 | extern void __pm_runtime_disable(struct device *dev, bool check_resume); |
| 31 | extern void pm_runtime_allow(struct device *dev); | ||
| 32 | extern void pm_runtime_forbid(struct device *dev); | ||
| 33 | extern int pm_generic_runtime_idle(struct device *dev); | ||
| 34 | extern int pm_generic_runtime_suspend(struct device *dev); | ||
| 35 | extern int pm_generic_runtime_resume(struct device *dev); | ||
| 31 | 36 | ||
| 32 | static inline bool pm_children_suspended(struct device *dev) | 37 | static inline bool pm_children_suspended(struct device *dev) |
| 33 | { | 38 | { |
| @@ -60,6 +65,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
| 60 | dev->power.run_wake = enable; | 65 | dev->power.run_wake = enable; |
| 61 | } | 66 | } |
| 62 | 67 | ||
| 68 | static inline bool pm_runtime_suspended(struct device *dev) | ||
| 69 | { | ||
| 70 | return dev->power.runtime_status == RPM_SUSPENDED; | ||
| 71 | } | ||
| 72 | |||
| 63 | #else /* !CONFIG_PM_RUNTIME */ | 73 | #else /* !CONFIG_PM_RUNTIME */ |
| 64 | 74 | ||
| 65 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } | 75 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } |
| @@ -78,6 +88,8 @@ static inline int __pm_runtime_set_status(struct device *dev, | |||
| 78 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } | 88 | static inline int pm_runtime_barrier(struct device *dev) { return 0; } |
| 79 | static inline void pm_runtime_enable(struct device *dev) {} | 89 | static inline void pm_runtime_enable(struct device *dev) {} |
| 80 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} | 90 | static inline void __pm_runtime_disable(struct device *dev, bool c) {} |
| 91 | static inline void pm_runtime_allow(struct device *dev) {} | ||
| 92 | static inline void pm_runtime_forbid(struct device *dev) {} | ||
| 81 | 93 | ||
| 82 | static inline bool pm_children_suspended(struct device *dev) { return false; } | 94 | static inline bool pm_children_suspended(struct device *dev) { return false; } |
| 83 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} | 95 | static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} |
| @@ -85,6 +97,11 @@ static inline void pm_runtime_get_noresume(struct device *dev) {} | |||
| 85 | static inline void pm_runtime_put_noidle(struct device *dev) {} | 97 | static inline void pm_runtime_put_noidle(struct device *dev) {} |
| 86 | static inline bool device_run_wake(struct device *dev) { return false; } | 98 | static inline bool device_run_wake(struct device *dev) { return false; } |
| 87 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 99 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
| 100 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | ||
| 101 | |||
| 102 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | ||
| 103 | static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } | ||
| 104 | static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } | ||
| 88 | 105 | ||
| 89 | #endif /* !CONFIG_PM_RUNTIME */ | 106 | #endif /* !CONFIG_PM_RUNTIME */ |
| 90 | 107 | ||
