aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/common.c')
-rw-r--r--drivers/base/power/common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index df41b4780b3b..b413951c6abc 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -153,6 +153,23 @@ struct device *dev_pm_domain_attach_by_id(struct device *dev,
153EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id); 153EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id);
154 154
155/** 155/**
156 * dev_pm_domain_attach_by_name - Associate a device with one of its PM domains.
157 * @dev: The device used to lookup the PM domain.
158 * @name: The name of the PM domain.
159 *
160 * For a detailed function description, see dev_pm_domain_attach_by_id().
161 */
162struct device *dev_pm_domain_attach_by_name(struct device *dev,
163 char *name)
164{
165 if (dev->pm_domain)
166 return ERR_PTR(-EEXIST);
167
168 return genpd_dev_pm_attach_by_name(dev, name);
169}
170EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_name);
171
172/**
156 * dev_pm_domain_detach - Detach a device from its PM domain. 173 * dev_pm_domain_detach - Detach a device from its PM domain.
157 * @dev: Device to detach. 174 * @dev: Device to detach.
158 * @power_off: Used to indicate whether we should power off the device. 175 * @power_off: Used to indicate whether we should power off the device.