diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-06 19:11:14 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-03 19:36:53 -0400 |
commit | 8bc0251de2932e603f8ed73b76ba2d64b2dc1d18 (patch) | |
tree | a29341739203de17f76c4044e5ad24b095e758f5 /include/linux/pm_domain.h | |
parent | fb7268be9f72bed6ae48554f00f2dcb2ef333bfc (diff) |
PM / Domains: Add power-on function using names to identify domains
It sometimes is necessary to turn on a given PM domain when only
the name of it is known and the domain pointer is not readily
available. For this reason, add a new helper function,
pm_genpd_name_poweron(), allowing the caller to turn on a PM domain
using its name for identification. To avoid code duplication,
move the domain lookup code to a separate function.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 8dbf48b8336f..d9d60835c29b 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -161,6 +161,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd, | |||
161 | struct dev_power_governor *gov, bool is_off); | 161 | struct dev_power_governor *gov, bool is_off); |
162 | 162 | ||
163 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); | 163 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); |
164 | extern int pm_genpd_name_poweron(const char *domain_name); | ||
164 | 165 | ||
165 | extern bool default_stop_ok(struct device *dev); | 166 | extern bool default_stop_ok(struct device *dev); |
166 | 167 | ||
@@ -240,6 +241,10 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd) | |||
240 | { | 241 | { |
241 | return -ENOSYS; | 242 | return -ENOSYS; |
242 | } | 243 | } |
244 | static inline int pm_genpd_name_poweron(const char *domain_name) | ||
245 | { | ||
246 | return -ENOSYS; | ||
247 | } | ||
243 | static inline bool default_stop_ok(struct device *dev) | 248 | static inline bool default_stop_ok(struct device *dev) |
244 | { | 249 | { |
245 | return false; | 250 | return false; |