mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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
This commit is contained in:
commit
d033e07856
9 changed files with 159 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue