diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-01-19 17:26:03 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-01-22 13:54:31 +0100 |
commit | d38b7bdc59aabdd3b6f59ab9d58b72d796a852f2 (patch) | |
tree | 93be12c1828aefe8b5de3bee6aeebb32854f30c3 /include/pm_domain.h | |
parent | 46a46b6cc8a2dad1316745d9e4fe26e5e55512c1 (diff) | |
download | barebox-d38b7bdc59aabdd3b6f59ab9d58b72d796a852f2.tar.gz barebox-d38b7bdc59aabdd3b6f59ab9d58b72d796a852f2.tar.xz |
pmdomain: implement pm_genpd_remove/of_genpd_del_provider for cleanup
We already have pm_genpd_init/of_genpd_add_provider, but lack functions
to deregister them. Port the deregisteration functions over from Linux.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240119162610.1014870-13-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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/pm_domain.h b/include/pm_domain.h index 1fa7f0bdbd..4b7b07b0e4 100644 --- a/include/pm_domain.h +++ b/include/pm_domain.h @@ -39,6 +39,8 @@ 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 pm_genpd_remove(struct generic_pm_domain *genpd); + int of_genpd_add_provider_simple(struct device_node *np, struct generic_pm_domain *genpd); @@ -51,6 +53,8 @@ struct genpd_onecell_data { int of_genpd_add_provider_onecell(struct device_node *np, struct genpd_onecell_data *data); +void of_genpd_del_provider(struct device_node *np); + void pm_genpd_print(void); #else @@ -65,6 +69,11 @@ static inline int pm_genpd_init(struct generic_pm_domain *genpd, return -ENOSYS; } +static inline int pm_genpd_remove(struct generic_pm_domain *genpd) +{ + return -EOPNOTSUPP; +} + static inline int genpd_dev_pm_attach(struct device *dev) { return 0; @@ -94,6 +103,10 @@ of_genpd_add_provider_simple(struct device_node *np, return -ENOTSUPP; } +static inline void of_genpd_del_provider(struct device_node *np) +{ +} + #endif /** |