Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / Runtime: Idle devices asynchronously after probe|release

Putting devices into idle|suspend in a synchronous manner means we are
waiting for each device to become idle|suspended before the probe|release
is fully done.

This patch switch to use the asynchronous runtime PM API:s instead and
thus improves the parallelism since we can move on and handle the next
device in queue in an earlier phase.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ulf Hansson and committed by
Greg Kroah-Hartman
fa180eb4 4e4098a3

+3 -3
+3 -3
drivers/base/dd.c
··· 380 380 381 381 pm_runtime_barrier(dev); 382 382 ret = really_probe(dev, drv); 383 - pm_runtime_idle(dev); 383 + pm_request_idle(dev); 384 384 385 385 return ret; 386 386 } ··· 428 428 } 429 429 } else { 430 430 ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); 431 - pm_runtime_idle(dev); 431 + pm_request_idle(dev); 432 432 } 433 433 out_unlock: 434 434 device_unlock(dev); ··· 499 499 BUS_NOTIFY_UNBIND_DRIVER, 500 500 dev); 501 501 502 - pm_runtime_put_sync(dev); 502 + pm_runtime_put(dev); 503 503 504 504 if (dev->bus && dev->bus->remove) 505 505 dev->bus->remove(dev);