diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-09-12 14:01:14 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-13 03:49:34 +0300 |
commit | 17926551c98a4ff5d7fa3a574c60534fedb3f2c6 (patch) | |
tree | 8f51ba0eb167423bf3913d8b2608000b88217437 /include/linux/pm_domain.h | |
parent | 3fe577107ccf1974958701df710e0b07ef16db75 (diff) | |
download | linux-17926551c98a4ff5d7fa3a574c60534fedb3f2c6.tar.xz |
PM / Domains: Add support for removing nested PM domains by provider
If a device supports PM domains that are subdomains of another PM
domain, then the PM domains should be removed in reverse order to
ensure that the subdomains are removed first. Furthermore, if there is
more than one provider, then there needs to be a way to remove the
domains in reverse order for a specific provider.
Add the function of_genpd_remove_last() to remove the last PM domain
added by a given PM domain provider and return the generic_pm_domain
structure for the PM domain that was removed.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 85f7d53a9827..a09fe5c009c8 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -204,6 +204,7 @@ extern int of_genpd_add_device(struct of_phandle_args *args, struct device *dev); extern int of_genpd_add_subdomain(struct of_phandle_args *parent, struct of_phandle_args *new_subdomain); +extern struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); int genpd_dev_pm_attach(struct device *dev); #else /* !CONFIG_PM_GENERIC_DOMAINS_OF */ @@ -237,6 +238,12 @@ static inline int genpd_dev_pm_attach(struct device *dev) { return -ENODEV; } + +static inline +struct generic_pm_domain *of_genpd_remove_last(struct device_node *np) +{ + return ERR_PTR(-ENOTSUPP); +} #endif /* CONFIG_PM_GENERIC_DOMAINS_OF */ #ifdef CONFIG_PM |