From af93933974d7b4dd1f9003e50bae239760fc7978 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Fri, 12 Apr 2013 09:41:06 +0000 Subject: PM / Runtime: Asyncronous idle|suspend devices at system resume Use the asyncronous runtime PM API when returning the runtime reference for the device after the system resume is completed. By using the asyncronous runtime PM API we don't have to wait for each an every device to become idle|suspended. Instead we can move on and handle the next device in queue. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki --- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base/power/domain.c') diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 9a6b05a35603..bba575841f53 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1327,7 +1327,7 @@ static void pm_genpd_complete(struct device *dev) pm_generic_complete(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); - pm_runtime_idle(dev); + pm_request_idle(dev); } } -- cgit v1.2.2 From 841670351e8e5acbe9f7367f7df661a5d0cfef79 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Fri, 12 Apr 2013 09:41:44 +0000 Subject: PM / Runtime: Improve prepare handling at system suspend for genpd When genpd prepares for a system suspend it will fetch a runtime reference for the device. When returning it we now use the asyncronous runtime PM API. Thus we don't have to wait for the device to become idle|suspended before we move on and handle the next device in queue. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki --- drivers/base/power/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/base/power/domain.c') diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index bba575841f53..7072404c8b6d 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev) pm_wakeup_event(dev, 0); if (pm_wakeup_pending()) { - pm_runtime_put_sync(dev); + pm_runtime_put(dev); return -EBUSY; } @@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev) pm_runtime_enable(dev); } - pm_runtime_put_sync(dev); + pm_runtime_put(dev); return ret; } -- cgit v1.2.2