aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-02-01 16:18:43 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2012-02-01 16:18:43 -0500
commitdcaad77a8074b6de58e745546bc543d5538404f2 (patch)
tree5f988393b64f1a8053f2f5d0be7113e991d40886 /include/linux/pm_domain.h
parent0496c8ae366724a0a2136cec09a2e277e782c126 (diff)
parent91cfbd4ee0875f8a826731983378670012ba6e01 (diff)
Merge branch 'v3.4-for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into pm-domains
* 'v3.4-for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: Hook up power domains to generic power domain infrastructure PM / Domains: Add OF support
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index a03a0ad998b8..e3ff87550eeb 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -11,6 +11,7 @@
11 11
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/err.h> 13#include <linux/err.h>
14#include <linux/of.h>
14 15
15enum gpd_status { 16enum gpd_status {
16 GPD_STATE_ACTIVE = 0, /* PM domain is active */ 17 GPD_STATE_ACTIVE = 0, /* PM domain is active */
@@ -70,6 +71,7 @@ struct generic_pm_domain {
70 s64 break_even_ns; /* Power break even for the entire domain. */ 71 s64 break_even_ns; /* Power break even for the entire domain. */
71 s64 max_off_time_ns; /* Maximum allowed "suspended" time. */ 72 s64 max_off_time_ns; /* Maximum allowed "suspended" time. */
72 ktime_t power_off_time; 73 ktime_t power_off_time;
74 struct device_node *of_node; /* Node in device tree */
73}; 75};
74 76
75static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) 77static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd)
@@ -117,12 +119,22 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
117 struct device *dev, 119 struct device *dev,
118 struct gpd_timing_data *td); 120 struct gpd_timing_data *td);
119 121
122extern int __pm_genpd_of_add_device(struct device_node *genpd_node,
123 struct device *dev,
124 struct gpd_timing_data *td);
125
120static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, 126static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
121 struct device *dev) 127 struct device *dev)
122{ 128{
123 return __pm_genpd_add_device(genpd, dev, NULL); 129 return __pm_genpd_add_device(genpd, dev, NULL);
124} 130}
125 131
132static inline int pm_genpd_of_add_device(struct device_node *genpd_node,
133 struct device *dev)
134{
135 return __pm_genpd_of_add_device(genpd_node, dev, NULL);
136}
137
126extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, 138extern int pm_genpd_remove_device(struct generic_pm_domain *genpd,
127 struct device *dev); 139 struct device *dev);
128extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, 140extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,