PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 13 Oct 2016 14:58:54 +0000 (16:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 18 Nov 2016 23:15:39 +0000 (00:15 +0100)
commit1d9174fbc55ec99ccbfcafa3de2528ef78a849aa
tree7554f95445c5a71a76fd4a044e8a595b94471e89
parenta8636c89648ab12e59d8f3aa667ec76fc96fd643
PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()

When the pm_runtime_force_suspend|resume() helpers were invented, we still
had CONFIG_PM_RUNTIME and CONFIG_PM_SLEEP as separate Kconfig options.

To make sure these helpers worked for all combinations and without
introducing too much of complexity, the device was always resumed in
pm_runtime_force_resume().

More precisely, when CONFIG_PM_SLEEP was set and CONFIG_PM_RUNTIME was
unset, we needed to resume the device as the subsystem/driver couldn't
rely on using runtime PM to do it.

As the CONFIG_PM_RUNTIME option was merged into CONFIG_PM a while ago, it
removed this combination, of using CONFIG_PM_SLEEP without the earlier
CONFIG_PM_RUNTIME.

For this reason we can now rely on the subsystem/driver to use runtime PM
to resume the device, instead of forcing that to be done in all cases. In
other words, let's defer the runtime resume to a later point when it's
actually needed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c