PM: domains: Don't runtime resume devices at genpd_prepare()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 4 Mar 2021 19:28:43 +0000 (20:28 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 18 Mar 2021 18:40:00 +0000 (19:40 +0100)
commitc1df456d0f06eb9275c1cd4c66548fc5738ea428
tree9670b36cfdd76d3a478d731a0d3cab74057795d4
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0
PM: domains: Don't runtime resume devices at genpd_prepare()

Runtime resuming a device upfront in the genpd_prepare() callback,
to check if there is a wakeup pending for it, seems like an
unnecessary thing to do.

The PM core already manages these kind of things in a common way in
__device_suspend(), via calling pm_runtime_barrier() and
pm_wakeup_pending().

Therefore, let's simply drop this behaviour from genpd_prepare().

Note that, this change is applicable only for devices that are
attached to a genpd that has the GENPD_FLAG_ACTIVE_WAKEUP set
(Renesas, Mediatek, and Rockchip platforms). Moreover, a driver
that needs to restore power for its device to re-configure it
for a system wakeup, may still call pm_runtime_get_sync(), for
example, to do this.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c