diff options
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r-- | include/linux/pm_runtime.h | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 878cf84baeb1..daac05d751b2 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -82,6 +82,11 @@ static inline bool pm_runtime_suspended(struct device *dev) | |||
82 | && !dev->power.disable_depth; | 82 | && !dev->power.disable_depth; |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline bool pm_runtime_status_suspended(struct device *dev) | ||
86 | { | ||
87 | return dev->power.runtime_status == RPM_SUSPENDED; | ||
88 | } | ||
89 | |||
85 | static inline bool pm_runtime_enabled(struct device *dev) | 90 | static inline bool pm_runtime_enabled(struct device *dev) |
86 | { | 91 | { |
87 | return !dev->power.disable_depth; | 92 | return !dev->power.disable_depth; |
@@ -130,6 +135,7 @@ static inline void pm_runtime_put_noidle(struct device *dev) {} | |||
130 | static inline bool device_run_wake(struct device *dev) { return false; } | 135 | static inline bool device_run_wake(struct device *dev) { return false; } |
131 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 136 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
132 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 137 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
138 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } | ||
133 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | 139 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } |
134 | 140 | ||
135 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } | 141 | static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } |
@@ -247,41 +253,41 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev) | |||
247 | 253 | ||
248 | struct pm_clk_notifier_block { | 254 | struct pm_clk_notifier_block { |
249 | struct notifier_block nb; | 255 | struct notifier_block nb; |
250 | struct dev_power_domain *pwr_domain; | 256 | struct dev_pm_domain *pm_domain; |
251 | char *con_ids[]; | 257 | char *con_ids[]; |
252 | }; | 258 | }; |
253 | 259 | ||
254 | #ifdef CONFIG_PM_RUNTIME_CLK | 260 | #ifdef CONFIG_PM_CLK |
255 | extern int pm_runtime_clk_init(struct device *dev); | 261 | extern int pm_clk_init(struct device *dev); |
256 | extern void pm_runtime_clk_destroy(struct device *dev); | 262 | extern void pm_clk_destroy(struct device *dev); |
257 | extern int pm_runtime_clk_add(struct device *dev, const char *con_id); | 263 | extern int pm_clk_add(struct device *dev, const char *con_id); |
258 | extern void pm_runtime_clk_remove(struct device *dev, const char *con_id); | 264 | extern void pm_clk_remove(struct device *dev, const char *con_id); |
259 | extern int pm_runtime_clk_suspend(struct device *dev); | 265 | extern int pm_clk_suspend(struct device *dev); |
260 | extern int pm_runtime_clk_resume(struct device *dev); | 266 | extern int pm_clk_resume(struct device *dev); |
261 | #else | 267 | #else |
262 | static inline int pm_runtime_clk_init(struct device *dev) | 268 | static inline int pm_clk_init(struct device *dev) |
263 | { | 269 | { |
264 | return -EINVAL; | 270 | return -EINVAL; |
265 | } | 271 | } |
266 | static inline void pm_runtime_clk_destroy(struct device *dev) | 272 | static inline void pm_clk_destroy(struct device *dev) |
267 | { | 273 | { |
268 | } | 274 | } |
269 | static inline int pm_runtime_clk_add(struct device *dev, const char *con_id) | 275 | static inline int pm_clk_add(struct device *dev, const char *con_id) |
270 | { | 276 | { |
271 | return -EINVAL; | 277 | return -EINVAL; |
272 | } | 278 | } |
273 | static inline void pm_runtime_clk_remove(struct device *dev, const char *con_id) | 279 | static inline void pm_clk_remove(struct device *dev, const char *con_id) |
274 | { | 280 | { |
275 | } | 281 | } |
276 | #define pm_runtime_clock_suspend NULL | 282 | #define pm_clk_suspend NULL |
277 | #define pm_runtime_clock_resume NULL | 283 | #define pm_clk_resume NULL |
278 | #endif | 284 | #endif |
279 | 285 | ||
280 | #ifdef CONFIG_HAVE_CLK | 286 | #ifdef CONFIG_HAVE_CLK |
281 | extern void pm_runtime_clk_add_notifier(struct bus_type *bus, | 287 | extern void pm_clk_add_notifier(struct bus_type *bus, |
282 | struct pm_clk_notifier_block *clknb); | 288 | struct pm_clk_notifier_block *clknb); |
283 | #else | 289 | #else |
284 | static inline void pm_runtime_clk_add_notifier(struct bus_type *bus, | 290 | static inline void pm_clk_add_notifier(struct bus_type *bus, |
285 | struct pm_clk_notifier_block *clknb) | 291 | struct pm_clk_notifier_block *clknb) |
286 | { | 292 | { |
287 | } | 293 | } |