Skip to contentSkip to conversation

PM / Runtime: Improve prepare handling at system suspend for genpd

PATCH New Ulf Hansson 3 participants 3 messages Apr 12, 2013 – Apr 15, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM / Runtime: Improve prepare handling at system suspend for genpd

From: Ulf Hansson <[email protected]>

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.

Cc Kevin Hilman <[email protected]>
Cc Alan Stern <[email protected]>
---
 drivers/base/power/domain.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/domain.c +2 -2
index 9a6b05a..e6ec4a7 100644
@@ -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;
 }
 
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/1 PM / Runtime: Improve prepare handling at system suspend for genpd

Quoted 11 lines · Ulf Hansson

From: Ulf Hansson <[email protected]>

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.

Cc Kevin Hilman <[email protected]>
Cc Alan Stern <[email protected]>

All three patches applied to linux-pm.git/linux-next.

Thanks,
Rafael

Quoted 27 lines
---
 drivers/base/power/domain.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/domain.c +2 -2
index 9a6b05a..e6ec4a7 100644
@@ -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;
 }
 
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#2 lore raw

PATCH 1/1 PM / Runtime: Improve prepare handling at system suspend for genpd

Quoted 9 lines · Rafael J. Wysocki
Quoted 8 lines · Ulf Hansson

From: Ulf Hansson <[email protected]>

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.

Quoted 5 lines
Quoted 3 lines
Cc Kevin Hilman <[email protected]>
Cc Alan Stern <[email protected]>

All three patches applied to linux-pm.git/linux-next.

In case it matters, for all three: