aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-07-13 06:31:52 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-13 06:31:52 -0400
commit5125bbf3880755419eff68672623cde49c4f31e8 (patch)
tree50c4bfa1745e6d30ca16652a4d2ea848c568eb31 /include/linux/pm_domain.h
parent56375fd420f851944960bd53dbb08d674f4d9406 (diff)
PM / Domains: Introduce function to power off all unused PM domains
Add a new function pm_genpd_poweroff_unused() queuing up the execution of pm_genpd_poweroff() for every initialized generic PM domain. Calling it will cause every generic PM domain without devices in use to be powered off. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index feb80af4cc1b..3e4f3d308f5e 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -24,6 +24,7 @@ struct dev_power_governor {
24 24
25struct generic_pm_domain { 25struct generic_pm_domain {
26 struct dev_pm_domain domain; /* PM domain operations */ 26 struct dev_pm_domain domain; /* PM domain operations */
27 struct list_head gpd_list_node; /* Node in the global PM domains list */
27 struct list_head sd_node; /* Node in the parent's subdomain list */ 28 struct list_head sd_node; /* Node in the parent's subdomain list */
28 struct generic_pm_domain *parent; /* Parent PM domain */ 29 struct generic_pm_domain *parent; /* Parent PM domain */
29 struct list_head sd_list; /* List of dubdomains */ 30 struct list_head sd_list; /* List of dubdomains */
@@ -71,6 +72,7 @@ extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
71extern void pm_genpd_init(struct generic_pm_domain *genpd, 72extern void pm_genpd_init(struct generic_pm_domain *genpd,
72 struct dev_power_governor *gov, bool is_off); 73 struct dev_power_governor *gov, bool is_off);
73extern int pm_genpd_poweron(struct generic_pm_domain *genpd); 74extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
75extern void pm_genpd_poweroff_unused(void);
74#else 76#else
75static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, 77static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
76 struct device *dev) 78 struct device *dev)
@@ -98,6 +100,7 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
98{ 100{
99 return -ENOSYS; 101 return -ENOSYS;
100} 102}
103static inline void pm_genpd_poweroff_unused(void) {}
101#endif 104#endif
102 105
103#endif /* _LINUX_PM_DOMAIN_H */ 106#endif /* _LINUX_PM_DOMAIN_H */