aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pm_runtime.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index e9cc049ccb62..d34f067e2a7f 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
85static inline bool pm_runtime_enabled(struct device *dev)
86{
87 return !dev->power.disable_depth;
88}
89
85static inline void pm_runtime_mark_last_busy(struct device *dev) 90static inline void pm_runtime_mark_last_busy(struct device *dev)
86{ 91{
87 ACCESS_ONCE(dev->power.last_busy) = jiffies; 92 ACCESS_ONCE(dev->power.last_busy) = jiffies;
@@ -120,6 +125,7 @@ static inline void pm_runtime_put_noidle(struct device *dev) {}
120static inline bool device_run_wake(struct device *dev) { return false; } 125static inline bool device_run_wake(struct device *dev) { return false; }
121static inline void device_set_run_wake(struct device *dev, bool enable) {} 126static inline void device_set_run_wake(struct device *dev, bool enable) {}
122static inline bool pm_runtime_suspended(struct device *dev) { return false; } 127static inline bool pm_runtime_suspended(struct device *dev) { return false; }
128static inline bool pm_runtime_enabled(struct device *dev) { return false; }
123 129
124static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } 130static inline int pm_generic_runtime_idle(struct device *dev) { return 0; }
125static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } 131static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }