aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h73
1 files changed, 56 insertions, 17 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 08adf8e5a80e..7c1d252b20c0 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -138,35 +138,32 @@ extern int __pm_genpd_of_add_device(struct device_node *genpd_node,
138 struct device *dev, 138 struct device *dev,
139 struct gpd_timing_data *td); 139 struct gpd_timing_data *td);
140 140
141static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, 141extern int __pm_genpd_name_add_device(const char *domain_name,
142 struct device *dev) 142 struct device *dev,
143{ 143 struct gpd_timing_data *td);
144 return __pm_genpd_add_device(genpd, dev, NULL);
145}
146
147static inline int pm_genpd_of_add_device(struct device_node *genpd_node,
148 struct device *dev)
149{
150 return __pm_genpd_of_add_device(genpd_node, dev, NULL);
151}
152 144
153extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, 145extern int pm_genpd_remove_device(struct generic_pm_domain *genpd,
154 struct device *dev); 146 struct device *dev);
155extern void pm_genpd_dev_need_restore(struct device *dev, bool val); 147extern void pm_genpd_dev_need_restore(struct device *dev, bool val);
156extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, 148extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
157 struct generic_pm_domain *new_subdomain); 149 struct generic_pm_domain *new_subdomain);
150extern int pm_genpd_add_subdomain_names(const char *master_name,
151 const char *subdomain_name);
158extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, 152extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
159 struct generic_pm_domain *target); 153 struct generic_pm_domain *target);
160extern int pm_genpd_add_callbacks(struct device *dev, 154extern int pm_genpd_add_callbacks(struct device *dev,
161 struct gpd_dev_ops *ops, 155 struct gpd_dev_ops *ops,
162 struct gpd_timing_data *td); 156 struct gpd_timing_data *td);
163extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); 157extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td);
164extern int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); 158extern int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state);
165extern int genpd_detach_cpuidle(struct generic_pm_domain *genpd); 159extern int pm_genpd_name_attach_cpuidle(const char *name, int state);
160extern int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd);
161extern int pm_genpd_name_detach_cpuidle(const char *name);
166extern void pm_genpd_init(struct generic_pm_domain *genpd, 162extern void pm_genpd_init(struct generic_pm_domain *genpd,
167 struct dev_power_governor *gov, bool is_off); 163 struct dev_power_governor *gov, bool is_off);
168 164
169extern int pm_genpd_poweron(struct generic_pm_domain *genpd); 165extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
166extern int pm_genpd_name_poweron(const char *domain_name);
170 167
171extern bool default_stop_ok(struct device *dev); 168extern bool default_stop_ok(struct device *dev);
172 169
@@ -187,8 +184,15 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
187{ 184{
188 return -ENOSYS; 185 return -ENOSYS;
189} 186}
190static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, 187static inline int __pm_genpd_of_add_device(struct device_node *genpd_node,
191 struct device *dev) 188 struct device *dev,
189 struct gpd_timing_data *td)
190{
191 return -ENOSYS;
192}
193static inline int __pm_genpd_name_add_device(const char *domain_name,
194 struct device *dev,
195 struct gpd_timing_data *td)
192{ 196{
193 return -ENOSYS; 197 return -ENOSYS;
194} 198}
@@ -203,6 +207,11 @@ static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
203{ 207{
204 return -ENOSYS; 208 return -ENOSYS;
205} 209}
210static inline int pm_genpd_add_subdomain_names(const char *master_name,
211 const char *subdomain_name)
212{
213 return -ENOSYS;
214}
206static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, 215static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
207 struct generic_pm_domain *target) 216 struct generic_pm_domain *target)
208{ 217{
@@ -218,11 +227,19 @@ static inline int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td)
218{ 227{
219 return -ENOSYS; 228 return -ENOSYS;
220} 229}
221static inline int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) 230static inline int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st)
231{
232 return -ENOSYS;
233}
234static inline int pm_genpd_name_attach_cpuidle(const char *name, int state)
222{ 235{
223 return -ENOSYS; 236 return -ENOSYS;
224} 237}
225static inline int genpd_detach_cpuidle(struct generic_pm_domain *genpd) 238static inline int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd)
239{
240 return -ENOSYS;
241}
242static inline int pm_genpd_name_detach_cpuidle(const char *name)
226{ 243{
227 return -ENOSYS; 244 return -ENOSYS;
228} 245}
@@ -234,6 +251,10 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
234{ 251{
235 return -ENOSYS; 252 return -ENOSYS;
236} 253}
254static inline int pm_genpd_name_poweron(const char *domain_name)
255{
256 return -ENOSYS;
257}
237static inline bool default_stop_ok(struct device *dev) 258static inline bool default_stop_ok(struct device *dev)
238{ 259{
239 return false; 260 return false;
@@ -242,6 +263,24 @@ static inline bool default_stop_ok(struct device *dev)
242#define pm_domain_always_on_gov NULL 263#define pm_domain_always_on_gov NULL
243#endif 264#endif
244 265
266static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
267 struct device *dev)
268{
269 return __pm_genpd_add_device(genpd, dev, NULL);
270}
271
272static inline int pm_genpd_of_add_device(struct device_node *genpd_node,
273 struct device *dev)
274{
275 return __pm_genpd_of_add_device(genpd_node, dev, NULL);
276}
277
278static inline int pm_genpd_name_add_device(const char *domain_name,
279 struct device *dev)
280{
281 return __pm_genpd_name_add_device(domain_name, dev, NULL);
282}
283
245static inline int pm_genpd_remove_callbacks(struct device *dev) 284static inline int pm_genpd_remove_callbacks(struct device *dev)
246{ 285{
247 return __pm_genpd_remove_callbacks(dev, true); 286 return __pm_genpd_remove_callbacks(dev, true);