PM / Domains: Allow runtime PM callbacks to be re-used during system PM
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 30 Nov 2015 15:21:38 +0000 (16:21 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Dec 2015 00:37:34 +0000 (01:37 +0100)
commitffe12855a5f7f195589130197558e6a5c276caa4
treeabaac9af5f4b5adef90687ddc71f6029deb40d4f
parent265e2cf672aaa9421e7012b4aa30c0ed80f1a447
PM / Domains: Allow runtime PM callbacks to be re-used during system PM

A runtime PM centric subsystem/driver may typically use the runtime PM
helpers, pm_runtime_force_suspend|resume() in the system PM path. This
means the genpd's runtime PM callbacks might be invoked even when runtime
PM has been disabled for the device.

To properly cope with these and similar scenarios when these helper
functions are used, change genpd to skip validating and measuring the
device PM QOS latency.

This is needed because otherwise genpd may prevent the device to be put
into low power state. If this occurs during system PM, it causes the
sequence to be aborted as a device's system PM callback returns -EBUSY.

Fixes: ba2bbfbf6307 (PM / Domains: Remove intermediate states from the power off sequence)
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Reported-by: Harunaga <nx-truong@jinso.co.jp>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 4.3+ <stable@vger.kernel.org> # 4.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c