aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-10-21 18:21:52 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-10-21 18:21:52 -0400
commitd033e078566faed8c8f59baf97ee57ce2524ef5c (patch)
tree46a98bf6a555ecbc8178baf6dd3a81553c3c3654 /drivers/base/power
parent081a9d043c983f161b78fdc4671324d1342b86bc (diff)
parent382414b93ac1e8ee7693be710e60c83eacc97c6f (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.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 22fe029ca212..6790cf7eba5a 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)
714 if (ret) 714 if (ret)
715 return ret; 715 return ret;
716 716
717 if (device_may_wakeup(dev) 717 if (dev->power.wakeup_path
718 && genpd->active_wakeup && genpd->active_wakeup(dev)) 718 && genpd->active_wakeup && genpd->active_wakeup(dev))
719 return 0; 719 return 0;
720 720
@@ -938,7 +938,7 @@ static int pm_genpd_dev_poweroff_noirq(struct device *dev)
938 if (ret) 938 if (ret)
939 return ret; 939 return ret;
940 940
941 if (device_may_wakeup(dev) 941 if (dev->power.wakeup_path
942 && genpd->active_wakeup && genpd->active_wakeup(dev)) 942 && genpd->active_wakeup && genpd->active_wakeup(dev))
943 return 0; 943 return 0;
944 944
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index b1b58260b4ff..59f8ab235486 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)
917 } 917 }
918 918
919 End: 919 End:
920 dev->power.is_suspended = !error; 920 if (!error) {
921 dev->power.is_suspended = true;
922 if (dev->power.wakeup_path && dev->parent)
923 dev->parent->power.wakeup_path = true;
924 }
921 925
922 device_unlock(dev); 926 device_unlock(dev);
923 complete_all(&dev->power.completion); 927 complete_all(&dev->power.completion);
@@ -1020,6 +1024,8 @@ static int device_prepare(struct device *dev, pm_message_t state)
1020 1024
1021 device_lock(dev); 1025 device_lock(dev);
1022 1026
1027 dev->power.wakeup_path = device_may_wakeup(dev);
1028
1023 if (dev->pm_domain) { 1029 if (dev->pm_domain) {
1024 pm_dev_dbg(dev, state, "preparing power domain "); 1030 pm_dev_dbg(dev, state, "preparing power domain ");
1025 if (dev->pm_domain->ops.prepare) 1031 if (dev->pm_domain->ops.prepare)