Lines Matching refs:power
94 dev->power.is_prepared = false; in device_pm_sleep_init()
95 dev->power.is_suspended = false; in device_pm_sleep_init()
96 dev->power.is_noirq_suspended = false; in device_pm_sleep_init()
97 dev->power.is_late_suspended = false; in device_pm_sleep_init()
98 init_completion(&dev->power.completion); in device_pm_sleep_init()
99 complete_all(&dev->power.completion); in device_pm_sleep_init()
100 dev->power.wakeup = NULL; in device_pm_sleep_init()
101 INIT_LIST_HEAD(&dev->power.entry); in device_pm_sleep_init()
129 if (dev->parent && dev->parent->power.is_prepared) in device_pm_add()
132 list_add_tail(&dev->power.entry, &dpm_list); in device_pm_add()
144 complete_all(&dev->power.completion); in device_pm_remove()
146 list_del_init(&dev->power.entry); in device_pm_remove()
163 list_move_tail(&deva->power.entry, &devb->power.entry); in device_pm_move_before()
177 list_move(&deva->power.entry, &devb->power.entry); in device_pm_move_after()
188 list_move_tail(&dev->power.entry, &dpm_list); in device_pm_move_last()
230 if (async || (pm_async_enabled && dev->power.async_suspend)) in dpm_wait()
231 wait_for_completion(&dev->power.completion); in dpm_wait()
483 if (dev->power.syscore || dev->power.direct_complete) in device_resume_noirq()
486 if (!dev->power.is_noirq_suspended) in device_resume_noirq()
511 dev->power.is_noirq_suspended = false; in device_resume_noirq()
514 complete_all(&dev->power.completion); in device_resume_noirq()
521 return dev->power.async_suspend && pm_async_enabled in is_async()
558 list_for_each_entry(dev, &dpm_noirq_list, power.entry) { in dpm_resume_noirq()
559 reinit_completion(&dev->power.completion); in dpm_resume_noirq()
569 list_move_tail(&dev->power.entry, &dpm_late_early_list); in dpm_resume_noirq()
612 if (dev->power.syscore || dev->power.direct_complete) in device_resume_early()
615 if (!dev->power.is_late_suspended) in device_resume_early()
640 dev->power.is_late_suspended = false; in device_resume_early()
646 complete_all(&dev->power.completion); in device_resume_early()
680 list_for_each_entry(dev, &dpm_late_early_list, power.entry) { in dpm_resume_early()
681 reinit_completion(&dev->power.completion); in dpm_resume_early()
691 list_move_tail(&dev->power.entry, &dpm_suspended_list); in dpm_resume_early()
741 if (dev->power.syscore) in device_resume()
744 if (dev->power.direct_complete) { in device_resume()
758 dev->power.is_prepared = false; in device_resume()
760 if (!dev->power.is_suspended) in device_resume()
806 dev->power.is_suspended = false; in device_resume()
813 complete_all(&dev->power.completion); in device_resume()
850 list_for_each_entry(dev, &dpm_suspended_list, power.entry) { in dpm_resume()
851 reinit_completion(&dev->power.completion); in dpm_resume()
876 if (!list_empty(&dev->power.entry)) in dpm_resume()
877 list_move_tail(&dev->power.entry, &dpm_prepared_list); in dpm_resume()
898 if (dev->power.syscore) in device_complete()
954 dev->power.is_prepared = false; in dpm_complete()
955 list_move(&dev->power.entry, &list); in dpm_complete()
1029 if (dev->power.syscore || dev->power.direct_complete) in __device_suspend_noirq()
1055 dev->power.is_noirq_suspended = true; in __device_suspend_noirq()
1060 complete_all(&dev->power.completion); in __device_suspend_noirq()
1080 reinit_completion(&dev->power.completion); in device_suspend_noirq()
1082 if (pm_async_enabled && dev->power.async_suspend) { in device_suspend_noirq()
1124 if (!list_empty(&dev->power.entry)) in dpm_suspend_noirq()
1125 list_move(&dev->power.entry, &dpm_noirq_list); in dpm_suspend_noirq()
1171 if (dev->power.syscore || dev->power.direct_complete) in __device_suspend_late()
1197 dev->power.is_late_suspended = true; in __device_suspend_late()
1202 complete_all(&dev->power.completion); in __device_suspend_late()
1221 reinit_completion(&dev->power.completion); in device_suspend_late()
1223 if (pm_async_enabled && dev->power.async_suspend) { in device_suspend_late()
1255 if (!list_empty(&dev->power.entry)) in dpm_suspend_late()
1256 list_move(&dev->power.entry, &dpm_late_early_list); in dpm_suspend_late()
1366 if (dev->power.syscore) in __device_suspend()
1369 if (dev->power.direct_complete) { in __device_suspend()
1377 dev->power.direct_complete = false; in __device_suspend()
1432 dev->power.is_suspended = true; in __device_suspend()
1434 spin_lock_irq(&parent->power.lock); in __device_suspend()
1436 dev->parent->power.direct_complete = false; in __device_suspend()
1437 if (dev->power.wakeup_path in __device_suspend()
1438 && !dev->parent->power.ignore_children) in __device_suspend()
1439 dev->parent->power.wakeup_path = true; in __device_suspend()
1441 spin_unlock_irq(&parent->power.lock); in __device_suspend()
1449 complete_all(&dev->power.completion); in __device_suspend()
1472 reinit_completion(&dev->power.completion); in device_suspend()
1474 if (pm_async_enabled && dev->power.async_suspend) { in device_suspend()
1515 if (!list_empty(&dev->power.entry)) in dpm_suspend()
1516 list_move(&dev->power.entry, &dpm_suspended_list); in dpm_suspend()
1548 if (dev->power.syscore) in device_prepare()
1561 dev->power.wakeup_path = device_may_wakeup(dev); in device_prepare()
1602 spin_lock_irq(&dev->power.lock); in device_prepare()
1603 dev->power.direct_complete = ret > 0 && state.event == PM_EVENT_SUSPEND; in device_prepare()
1604 spin_unlock_irq(&dev->power.lock); in device_prepare()
1643 dev->power.is_prepared = true; in dpm_prepare()
1644 if (!list_empty(&dev->power.entry)) in dpm_prepare()
1645 list_move_tail(&dev->power.entry, &dpm_prepared_list); in dpm_prepare()
1688 dpm_wait(dev, subordinate->power.async_suspend); in device_pm_wait_for_dev()
1709 list_for_each_entry(dev, &dpm_list, power.entry) in dpm_for_each_dev()