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>
This commit is contained in:
parent
fb7268be9f
commit
8bc0251de2
2 changed files with 36 additions and 15 deletions
|
@ -161,6 +161,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd,
|
|||
struct dev_power_governor *gov, bool is_off);
|
||||
|
||||
extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
|
||||
extern int pm_genpd_name_poweron(const char *domain_name);
|
||||
|
||||
extern bool default_stop_ok(struct device *dev);
|
||||
|
||||
|
@ -240,6 +241,10 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
|
|||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline int pm_genpd_name_poweron(const char *domain_name)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline bool default_stop_ok(struct device *dev)
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue