summaryrefslogtreecommitdiffstats
path: root/include/pm_domain.h
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-01-19 17:25:59 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-22 11:12:02 +0100
commit9200d8dc5efedcd603dfcfb2b287de86db7ba303 (patch)
tree80fa4faf5b11f30c81ecf25bcb864b59225af55f /include/pm_domain.h
parent26c0bb95d2552fd36eb035c127dc1065293d13b6 (diff)
downloadbarebox-9200d8dc5efedcd603dfcfb2b287de86db7ba303.tar.gz
barebox-9200d8dc5efedcd603dfcfb2b287de86db7ba303.tar.xz
pmdomain: add support for enabling power domains later on
When a single power domain is specified platform driver probe takes care to enable the power domain. When there are multiple power domains however, each Linux driver must itself enable power domains in the correct sequence. In Linux, this is handled by runtime PM. We don't have that in barebox, so we add the enable function with a _genpd suffix to alert users to this fact. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240119162610.1014870-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/pm_domain.h')
-rw-r--r--include/pm_domain.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/pm_domain.h b/include/pm_domain.h
index b02af0d46d..f242a05b49 100644
--- a/include/pm_domain.h
+++ b/include/pm_domain.h
@@ -30,12 +30,13 @@ typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args,
void genpd_activate(void);
int genpd_dev_pm_attach(struct device *dev);
-
struct device *genpd_dev_pm_attach_by_id(struct device *dev,
unsigned int index);
struct device *genpd_dev_pm_attach_by_name(struct device *dev,
const char *name);
+int pm_runtime_resume_and_get_genpd(struct device *dev);
+
int pm_genpd_init(struct generic_pm_domain *genpd, void *gov, bool is_off);
int of_genpd_add_provider_simple(struct device_node *np,
@@ -81,6 +82,11 @@ static inline struct device *genpd_dev_pm_attach_by_name(struct device *dev,
return NULL;
}
+static inline int pm_runtime_resume_and_get_genpd(struct device *dev)
+{
+ return 0;
+}
+
static inline int
of_genpd_add_provider_simple(struct device_node *np,
struct generic_pm_domain *genpd)