diff options
author | Thierry Reding <treding@nvidia.com> | 2017-03-29 18:34:50 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-06-13 15:15:08 +0200 |
commit | 408455245a48a1ecabd90133bae0baec3ec4cfb8 (patch) | |
tree | 81f8b53b6afde7256132df44f351ef04044a4a18 /include/linux/pm_domain.h | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | linux-next-408455245a48a1ecabd90133bae0baec3ec4cfb8.tar.gz |
PM / Domains: Allow overriding the ->xlate() callback
Allow generic power domain providers to override the ->xlate() callback
in case the default genpd_xlate_onecell() translation callback is not
good enough.
One potential use-case for this is to allow generic power domains to be
specified by an ID rather than an index.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index b7803a251044..41004d97cefa 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -206,9 +206,13 @@ static inline void pm_genpd_syscore_poweron(struct device *dev) {} /* OF PM domain providers */ struct of_device_id; +typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args, + void *data); + struct genpd_onecell_data { struct generic_pm_domain **domains; unsigned int num_domains; + genpd_xlate_t xlate; }; #ifdef CONFIG_PM_GENERIC_DOMAINS_OF |