aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-03-29 18:34:50 +0200
committerThierry Reding <treding@nvidia.com>2017-06-13 15:15:08 +0200
commit408455245a48a1ecabd90133bae0baec3ec4cfb8 (patch)
tree81f8b53b6afde7256132df44f351ef04044a4a18 /include/linux/pm_domain.h
parentLinux 4.12-rc1 (diff)
downloadlinux-dev-408455245a48a1ecabd90133bae0baec3ec4cfb8.tar.xz
linux-dev-408455245a48a1ecabd90133bae0baec3ec4cfb8.zip
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.h4
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