summaryrefslogtreecommitdiff
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-03-29 19:34:50 +0300
committerThierry Reding <treding@nvidia.com>2017-06-13 16:15:08 +0300
commit408455245a48a1ecabd90133bae0baec3ec4cfb8 (patch)
tree81f8b53b6afde7256132df44f351ef04044a4a18 /include/linux/pm_domain.h
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-408455245a48a1ecabd90133bae0baec3ec4cfb8.tar.xz
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