diff options
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r-- | include/linux/pm_runtime.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index f271860c78d5..7d7e09efff9b 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -47,6 +47,7 @@ extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); | |||
47 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); | 47 | extern unsigned long pm_runtime_autosuspend_expiration(struct device *dev); |
48 | extern void pm_runtime_update_max_time_suspended(struct device *dev, | 48 | extern void pm_runtime_update_max_time_suspended(struct device *dev, |
49 | s64 delta_ns); | 49 | s64 delta_ns); |
50 | extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); | ||
50 | 51 | ||
51 | static inline bool pm_children_suspended(struct device *dev) | 52 | static inline bool pm_children_suspended(struct device *dev) |
52 | { | 53 | { |
@@ -80,6 +81,12 @@ static inline bool pm_runtime_suspended(struct device *dev) | |||
80 | && !dev->power.disable_depth; | 81 | && !dev->power.disable_depth; |
81 | } | 82 | } |
82 | 83 | ||
84 | static inline bool pm_runtime_active(struct device *dev) | ||
85 | { | ||
86 | return dev->power.runtime_status == RPM_ACTIVE | ||
87 | || dev->power.disable_depth; | ||
88 | } | ||
89 | |||
83 | static inline bool pm_runtime_status_suspended(struct device *dev) | 90 | static inline bool pm_runtime_status_suspended(struct device *dev) |
84 | { | 91 | { |
85 | return dev->power.runtime_status == RPM_SUSPENDED; | 92 | return dev->power.runtime_status == RPM_SUSPENDED; |
@@ -132,6 +139,7 @@ static inline void pm_runtime_put_noidle(struct device *dev) {} | |||
132 | static inline bool device_run_wake(struct device *dev) { return false; } | 139 | static inline bool device_run_wake(struct device *dev) { return false; } |
133 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 140 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
134 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 141 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
142 | static inline bool pm_runtime_active(struct device *dev) { return true; } | ||
135 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } | 143 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } |
136 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | 144 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } |
137 | 145 | ||
@@ -149,6 +157,8 @@ static inline void pm_runtime_set_autosuspend_delay(struct device *dev, | |||
149 | int delay) {} | 157 | int delay) {} |
150 | static inline unsigned long pm_runtime_autosuspend_expiration( | 158 | static inline unsigned long pm_runtime_autosuspend_expiration( |
151 | struct device *dev) { return 0; } | 159 | struct device *dev) { return 0; } |
160 | static inline void pm_runtime_set_memalloc_noio(struct device *dev, | ||
161 | bool enable){} | ||
152 | 162 | ||
153 | #endif /* !CONFIG_PM_RUNTIME */ | 163 | #endif /* !CONFIG_PM_RUNTIME */ |
154 | 164 | ||