aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-04-29 19:53:17 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-04-29 19:53:17 -0400
commitd9c5841e22231e4e49fd0a1004164e6fce59b7a6 (patch)
treee1f589c46b3ff79bbe7b1b2469f6362f94576da6 /include/linux/pm_runtime.h
parentb701a47ba48b698976fb2fe05fb285b0edc1d26a (diff)
parent5967ed87ade85a421ef814296c3c7f182b08c225 (diff)
Merge branch 'x86/asm' into x86/atomic
Merge reason: Conflict between LOCK_PREFIX_HERE and relative alternatives pointers Resolved Conflicts: arch/x86/include/asm/alternative.h arch/x86/kernel/alternative.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 370ce0a6fe4a..b776db737244 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -28,6 +28,8 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status);
28extern int pm_runtime_barrier(struct device *dev); 28extern int pm_runtime_barrier(struct device *dev);
29extern void pm_runtime_enable(struct device *dev); 29extern void pm_runtime_enable(struct device *dev);
30extern void __pm_runtime_disable(struct device *dev, bool check_resume); 30extern void __pm_runtime_disable(struct device *dev, bool check_resume);
31extern void pm_runtime_allow(struct device *dev);
32extern void pm_runtime_forbid(struct device *dev);
31 33
32static inline bool pm_children_suspended(struct device *dev) 34static inline bool pm_children_suspended(struct device *dev)
33{ 35{
@@ -60,6 +62,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable)
60 dev->power.run_wake = enable; 62 dev->power.run_wake = enable;
61} 63}
62 64
65static inline bool pm_runtime_suspended(struct device *dev)
66{
67 return dev->power.runtime_status == RPM_SUSPENDED;
68}
69
63#else /* !CONFIG_PM_RUNTIME */ 70#else /* !CONFIG_PM_RUNTIME */
64 71
65static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } 72static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; }
@@ -78,6 +85,8 @@ static inline int __pm_runtime_set_status(struct device *dev,
78static inline int pm_runtime_barrier(struct device *dev) { return 0; } 85static inline int pm_runtime_barrier(struct device *dev) { return 0; }
79static inline void pm_runtime_enable(struct device *dev) {} 86static inline void pm_runtime_enable(struct device *dev) {}
80static inline void __pm_runtime_disable(struct device *dev, bool c) {} 87static inline void __pm_runtime_disable(struct device *dev, bool c) {}
88static inline void pm_runtime_allow(struct device *dev) {}
89static inline void pm_runtime_forbid(struct device *dev) {}
81 90
82static inline bool pm_children_suspended(struct device *dev) { return false; } 91static inline bool pm_children_suspended(struct device *dev) { return false; }
83static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} 92static inline void pm_suspend_ignore_children(struct device *dev, bool en) {}
@@ -85,6 +94,7 @@ static inline void pm_runtime_get_noresume(struct device *dev) {}
85static inline void pm_runtime_put_noidle(struct device *dev) {} 94static inline void pm_runtime_put_noidle(struct device *dev) {}
86static inline bool device_run_wake(struct device *dev) { return false; } 95static inline bool device_run_wake(struct device *dev) { return false; }
87static inline void device_set_run_wake(struct device *dev, bool enable) {} 96static inline void device_set_run_wake(struct device *dev, bool enable) {}
97static inline bool pm_runtime_suspended(struct device *dev) { return false; }
88 98
89#endif /* !CONFIG_PM_RUNTIME */ 99#endif /* !CONFIG_PM_RUNTIME */
90 100