diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-10-22 00:21:52 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-10-22 00:21:52 +0200 |
commit | d033e078566faed8c8f59baf97ee57ce2524ef5c (patch) | |
tree | 46a98bf6a555ecbc8178baf6dd3a81553c3c3654 /drivers/base/power | |
parent | 081a9d043c983f161b78fdc4671324d1342b86bc (diff) | |
parent | 382414b93ac1e8ee7693be710e60c83eacc97c6f (diff) |
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/power')
-rw-r--r-- | drivers/base/power/domain.c | 4 | ||||
-rw-r--r-- | drivers/base/power/main.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 22fe029ca21..6790cf7eba5 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 b1b58260b4f..59f8ab23548 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) |