PM / Domains: Don't power on at attach for the multi PM domain case
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 29 Jun 2018 09:15:37 +0000 (11:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 3 Jul 2018 14:42:51 +0000 (16:42 +0200)
commit895b66129ad8c562865b64306032bdb378f4484f
tree448cc255f0b5359509564b81b9a6f12ee3d02abf
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063
PM / Domains: Don't power on at attach for the multi PM domain case

There are no legacy behavior in drivers to consider while attaching a
device to genpd - for the multiple PM domain case.

For that reason, let's instead require the driver to runtime resume the
device, via calling pm_runtime_get_sync() for example, when it needs to
power on the corresponding PM domain.

This allows us to improve the situation during attach. Instead of always
power on the PM domain, which may be unnecessary, let's leave it in its
current state. Additionally, to avoid the PM domain to stay powered on,
let's schedule a power off work.

Fixes: 3c095f32a92b (PM / Domains: Add support for multi PM domains ...)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c