diff options
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r-- | include/linux/pm_runtime.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 2a5897a4afbc..43fd6716f662 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
@@ -101,6 +101,11 @@ static inline bool pm_runtime_status_suspended(struct device *dev) | |||
101 | return dev->power.runtime_status == RPM_SUSPENDED; | 101 | return dev->power.runtime_status == RPM_SUSPENDED; |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline bool pm_runtime_suspended_if_enabled(struct device *dev) | ||
105 | { | ||
106 | return pm_runtime_status_suspended(dev) && dev->power.disable_depth == 1; | ||
107 | } | ||
108 | |||
104 | static inline bool pm_runtime_enabled(struct device *dev) | 109 | static inline bool pm_runtime_enabled(struct device *dev) |
105 | { | 110 | { |
106 | return !dev->power.disable_depth; | 111 | return !dev->power.disable_depth; |
@@ -150,6 +155,7 @@ static inline void device_set_run_wake(struct device *dev, bool enable) {} | |||
150 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | 155 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } |
151 | static inline bool pm_runtime_active(struct device *dev) { return true; } | 156 | static inline bool pm_runtime_active(struct device *dev) { return true; } |
152 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } | 157 | static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } |
158 | static inline bool pm_runtime_suspended_if_enabled(struct device *dev) { return false; } | ||
153 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } | 159 | static inline bool pm_runtime_enabled(struct device *dev) { return false; } |
154 | 160 | ||
155 | static inline void pm_runtime_no_callbacks(struct device *dev) {} | 161 | static inline void pm_runtime_no_callbacks(struct device *dev) {} |