summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-10-22 00:21:52 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-10-22 00:21:52 +0200
commitd033e078566faed8c8f59baf97ee57ce2524ef5c (patch)
tree46a98bf6a555ecbc8178baf6dd3a81553c3c3654 /drivers/base
parent081a9d043c983f161b78fdc4671324d1342b86bc (diff)
parent382414b93ac1e8ee7693be710e60c83eacc97c6f (diff)
downloadop-kernel-dev-d033e078566faed8c8f59baf97ee57ce2524ef5c.zip
op-kernel-dev-d033e078566faed8c8f59baf97ee57ce2524ef5c.tar.gz
Merge branch 'pm-domains' into pm-for-linus
* pm-domains: ARM: mach-shmobile: sh7372 A4R support (v4) ARM: mach-shmobile: sh7372 A3SP support (v4) PM / Sleep: Mark devices involved in wakeup signaling during suspend
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c4
-rw-r--r--drivers/base/power/main.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 22fe029..6790cf7 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -714,7 +714,7 @@ static int pm_genpd_suspend_noirq(struct device *dev)
if (ret)
return ret;
- if (device_may_wakeup(dev)
+ if (dev->power.wakeup_path
&& genpd->active_wakeup && genpd->active_wakeup(dev))
return 0;
@@ -938,7 +938,7 @@ static int pm_genpd_dev_poweroff_noirq(struct device *dev)
if (ret)
return ret;
- if (device_may_wakeup(dev)
+ if (dev->power.wakeup_path
&& genpd->active_wakeup && genpd->active_wakeup(dev))
return 0;
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index b1b5826..59f8ab2 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -917,7 +917,11 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
}
End:
- dev->power.is_suspended = !error;
+ if (!error) {
+ dev->power.is_suspended = true;
+ if (dev->power.wakeup_path && dev->parent)
+ dev->parent->power.wakeup_path = true;
+ }
device_unlock(dev);
complete_all(&dev->power.completion);
@@ -1020,6 +1024,8 @@ static int device_prepare(struct device *dev, pm_message_t state)
device_lock(dev);
+ dev->power.wakeup_path = device_may_wakeup(dev);
+
if (dev->pm_domain) {
pm_dev_dbg(dev, state, "preparing power domain ");
if (dev->pm_domain->ops.prepare)
OpenPOWER on IntegriCloud