aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux
diff options
context:
space:
mode:
authorDikshita Agarwal <quic_dikshita@quicinc.com>2024-08-19 15:59:09 +0530
committerUlf Hansson <ulf.hansson@linaro.org>2024-08-20 11:19:49 +0200
commitb6cee6544d01b8ac01232d343b1b2b594d94d61c (patch)
tree0246bdaf94551747ee085a75e9e5f49c52eebeec /include/linux
parentpmdomain: rockchip: Add support for RK3576 SoC (diff)
downloadwireguard-linux-b6cee6544d01b8ac01232d343b1b2b594d94d61c.tar.xz
wireguard-linux-b6cee6544d01b8ac01232d343b1b2b594d94d61c.zip
PM: domains: add device managed version of dev_pm_domain_attach|detach_list()
Add the devres-enabled version of dev_pm_domain_attach|detach_list. If client drivers use devm_pm_domain_attach_list() to attach the PM domains, devm_pm_domain_detach_list() will be invoked implicitly during remove phase. Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Link: https://lore.kernel.org/r/1724063350-11993-2-git-send-email-quic_dikshita@quicinc.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pm_domain.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index b86bb52858ac..b637ec14025f 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -476,6 +476,9 @@ struct device *dev_pm_domain_attach_by_name(struct device *dev,
int dev_pm_domain_attach_list(struct device *dev,
const struct dev_pm_domain_attach_data *data,
struct dev_pm_domain_list **list);
+int devm_pm_domain_attach_list(struct device *dev,
+ const struct dev_pm_domain_attach_data *data,
+ struct dev_pm_domain_list **list);
void dev_pm_domain_detach(struct device *dev, bool power_off);
void dev_pm_domain_detach_list(struct dev_pm_domain_list *list);
int dev_pm_domain_start(struct device *dev);
@@ -502,6 +505,14 @@ static inline int dev_pm_domain_attach_list(struct device *dev,
{
return 0;
}
+
+static inline int devm_pm_domain_attach_list(struct device *dev,
+ const struct dev_pm_domain_attach_data *data,
+ struct dev_pm_domain_list **list)
+{
+ return 0;
+}
+
static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {}
static inline void dev_pm_domain_detach_list(struct dev_pm_domain_list *list) {}
static inline int dev_pm_domain_start(struct device *dev)