aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-09-25 17:35:15 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-10-16 19:57:47 -0400
commit7490e44239e60293bca0c2663229050c36c660c2 (patch)
tree938cd1cafba133f2d47c648ac01242de841d6d1b /include/linux/pm_runtime.h
parent140a6c945211ee911dec776fafa52e03a7d7bb9a (diff)
PM / Runtime: Add no_callbacks flag
Some devices, such as USB interfaces, cannot be power-managed independently of their parents, i.e., they cannot be put in low power while the parent remains at full power. This patch (as1425) creates a new "no_callbacks" flag, which tells the PM core not to invoke the runtime-PM callback routines for the such devices but instead to assume that the callbacks always succeed. In addition, the non-debugging runtime-PM sysfs attributes for the devices are removed, since they are pretty much meaningless. The advantage of this scheme comes not so much from avoiding the callbacks themselves, but rather from the fact that without the need for a process context in which to run the callbacks, more work can be done in interrupt context. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 5869d87fffac..8ca52f7c357e 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -36,6 +36,7 @@ extern void pm_runtime_forbid(struct device *dev);
36extern int pm_generic_runtime_idle(struct device *dev); 36extern int pm_generic_runtime_idle(struct device *dev);
37extern int pm_generic_runtime_suspend(struct device *dev); 37extern int pm_generic_runtime_suspend(struct device *dev);
38extern int pm_generic_runtime_resume(struct device *dev); 38extern int pm_generic_runtime_resume(struct device *dev);
39extern void pm_runtime_no_callbacks(struct device *dev);
39 40
40static inline bool pm_children_suspended(struct device *dev) 41static inline bool pm_children_suspended(struct device *dev)
41{ 42{
@@ -110,6 +111,7 @@ static inline bool pm_runtime_suspended(struct device *dev) { return false; }
110static inline int pm_generic_runtime_idle(struct device *dev) { return 0; } 111static inline int pm_generic_runtime_idle(struct device *dev) { return 0; }
111static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } 112static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
112static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } 113static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
114static inline void pm_runtime_no_callbacks(struct device *dev) {}
113 115
114#endif /* !CONFIG_PM_RUNTIME */ 116#endif /* !CONFIG_PM_RUNTIME */
115 117