PM / Domains: Introduce option to attach a device by name to genpd
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 29 Jun 2018 11:04:31 +0000 (13:04 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 9 Jul 2018 10:11:02 +0000 (12:11 +0200)
commit5d6be70add65e3f236642ab0029e356261617cd0
treeb385e69e0c3ea5ceb5f43a8c4579fab80e69c32c
parent79a5c45199cd942047b1cf7bb50ff0699c2a3af0
PM / Domains: Introduce option to attach a device by name to genpd

For the multiple PM domain case, let's introduce a new function called
genpd_dev_pm_attach_by_name(). This allows a device to be associated with
its PM domain through genpd, by using a name based lookup.

Note that, genpd_dev_pm_attach_by_name() shall only be called by the driver
core / PM core, similar to how the existing dev_pm_domain_attach_by_id()
makes use of genpd_dev_pm_attach_by_id(). However, this is implemented by
following changes on top.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c
include/linux/pm_domain.h