Lines Matching refs:power

98 	dev->power.is_prepared = false;  in device_pm_sleep_init()
99 dev->power.is_suspended = false; in device_pm_sleep_init()
100 dev->power.is_noirq_suspended = false; in device_pm_sleep_init()
101 dev->power.is_late_suspended = false; in device_pm_sleep_init()
102 init_completion(&dev->power.completion); in device_pm_sleep_init()
103 complete_all(&dev->power.completion); in device_pm_sleep_init()
104 dev->power.wakeup = NULL; in device_pm_sleep_init()
105 INIT_LIST_HEAD(&dev->power.entry); in device_pm_sleep_init()
138 if (dev->parent && dev->parent->power.is_prepared) in device_pm_add()
141 list_add_tail(&dev->power.entry, &dpm_list); in device_pm_add()
142 dev->power.in_dpm_list = true; in device_pm_add()
157 complete_all(&dev->power.completion); in device_pm_remove()
159 list_del_init(&dev->power.entry); in device_pm_remove()
160 dev->power.in_dpm_list = false; in device_pm_remove()
178 list_move_tail(&deva->power.entry, &devb->power.entry); in device_pm_move_before()
192 list_move(&deva->power.entry, &devb->power.entry); in device_pm_move_after()
203 list_move_tail(&dev->power.entry, &dpm_list); in device_pm_move_last()
240 if (async || (pm_async_enabled && dev->power.async_suspend)) in dpm_wait()
241 wait_for_completion(&dev->power.completion); in dpm_wait()
442 ", may wakeup" : "", dev->power.driver_flags); in pm_dev_dbg()
577 return !dev->power.must_resume; in dev_pm_skip_resume()
582 return dev->power.async_suspend && pm_async_enabled in is_async()
588 reinit_completion(&dev->power.completion); in dpm_async_fn()
591 dev->power.async_in_progress = true; in dpm_async_fn()
605 dev->power.async_in_progress = false; in dpm_async_fn()
628 if (dev->power.syscore || dev->power.direct_complete) in device_resume_noirq()
631 if (!dev->power.is_noirq_suspended) in device_resume_noirq()
681 dev->power.is_noirq_suspended = false; in device_resume_noirq()
684 complete_all(&dev->power.completion); in device_resume_noirq()
718 list_for_each_entry(dev, &dpm_noirq_list, power.entry) in dpm_noirq_resume_devices()
723 list_move_tail(&dev->power.entry, &dpm_late_early_list); in dpm_noirq_resume_devices()
725 if (!dev->power.async_in_progress) { in dpm_noirq_resume_devices()
778 if (dev->power.syscore || dev->power.direct_complete) in device_resume_early()
781 if (!dev->power.is_late_suspended) in device_resume_early()
815 dev->power.is_late_suspended = false; in device_resume_early()
821 complete_all(&dev->power.completion); in device_resume_early()
858 list_for_each_entry(dev, &dpm_late_early_list, power.entry) in dpm_resume_early()
863 list_move_tail(&dev->power.entry, &dpm_suspended_list); in dpm_resume_early()
865 if (!dev->power.async_in_progress) { in dpm_resume_early()
913 if (dev->power.syscore) in device_resume()
916 if (dev->power.direct_complete) { in device_resume()
932 dev->power.is_prepared = false; in device_resume()
934 if (!dev->power.is_suspended) in device_resume()
974 dev->power.is_suspended = false; in device_resume()
981 complete_all(&dev->power.completion); in device_resume()
1024 list_for_each_entry(dev, &dpm_suspended_list, power.entry) in dpm_resume()
1029 list_move_tail(&dev->power.entry, &dpm_prepared_list); in dpm_resume()
1031 if (!dev->power.async_in_progress) { in dpm_resume()
1064 if (dev->power.syscore) in device_complete()
1119 dev->power.is_prepared = false; in dpm_complete()
1120 list_move(&dev->power.entry, &list); in dpm_complete()
1184 dev->parent->power.must_resume = true; in dpm_superior_set_must_resume()
1189 link->supplier->power.must_resume = true; in dpm_superior_set_must_resume()
1217 if (dev->power.syscore || dev->power.direct_complete) in device_suspend_noirq()
1254 dev->power.is_noirq_suspended = true; in device_suspend_noirq()
1262 if (atomic_read(&dev->power.usage_count) > 1 || in device_suspend_noirq()
1264 dev->power.may_skip_resume)) in device_suspend_noirq()
1265 dev->power.must_resume = true; in device_suspend_noirq()
1267 if (dev->power.must_resume) in device_suspend_noirq()
1271 complete_all(&dev->power.completion); in device_suspend_noirq()
1299 list_move(&dev->power.entry, &dpm_noirq_list); in dpm_noirq_suspend_devices()
1360 spin_lock_irq(&parent->power.lock); in dpm_propagate_wakeup_to_parent()
1362 if (device_wakeup_path(dev) && !parent->power.ignore_children) in dpm_propagate_wakeup_to_parent()
1363 parent->power.wakeup_path = true; in dpm_propagate_wakeup_to_parent()
1365 spin_unlock_irq(&parent->power.lock); in dpm_propagate_wakeup_to_parent()
1397 if (dev->power.syscore || dev->power.direct_complete) in device_suspend_late()
1435 dev->power.is_late_suspended = true; in device_suspend_late()
1439 complete_all(&dev->power.completion); in device_suspend_late()
1472 list_move(&dev->power.entry, &dpm_late_early_list); in dpm_suspend_late()
1561 spin_lock_irq(&dev->parent->power.lock); in dpm_clear_superiors_direct_complete()
1562 dev->parent->power.direct_complete = false; in dpm_clear_superiors_direct_complete()
1563 spin_unlock_irq(&dev->parent->power.lock); in dpm_clear_superiors_direct_complete()
1569 spin_lock_irq(&link->supplier->power.lock); in dpm_clear_superiors_direct_complete()
1570 link->supplier->power.direct_complete = false; in dpm_clear_superiors_direct_complete()
1571 spin_unlock_irq(&link->supplier->power.lock); in dpm_clear_superiors_direct_complete()
1596 dev->power.direct_complete = false; in device_suspend()
1614 dev->power.direct_complete = false; in device_suspend()
1619 if (dev->power.syscore) in device_suspend()
1624 dev->power.direct_complete = false; in device_suspend()
1626 if (dev->power.direct_complete) { in device_suspend()
1636 dev->power.direct_complete = false; in device_suspend()
1639 dev->power.may_skip_resume = true; in device_suspend()
1640 dev->power.must_resume = !dev_pm_test_driver_flags(dev, DPM_FLAG_MAY_SKIP_RESUME); in device_suspend()
1685 dev->power.is_suspended = true; in device_suspend()
1687 dev->power.wakeup_path = true; in device_suspend()
1703 complete_all(&dev->power.completion); in device_suspend()
1739 list_move(&dev->power.entry, &dpm_suspended_list); in dpm_suspend()
1793 if (dev->power.syscore) in device_prepare()
1798 dev->power.wakeup_path = false; in device_prepare()
1800 if (dev->power.no_pm_callbacks) in device_prepare()
1833 spin_lock_irq(&dev->power.lock); in device_prepare()
1834 dev->power.direct_complete = state.event == PM_EVENT_SUSPEND && in device_prepare()
1835 (ret > 0 || dev->power.no_pm_callbacks) && in device_prepare()
1837 spin_unlock_irq(&dev->power.lock); in device_prepare()
1883 dev->power.is_prepared = true; in dpm_prepare()
1884 if (!list_empty(&dev->power.entry)) in dpm_prepare()
1885 list_move_tail(&dev->power.entry, &dpm_prepared_list); in dpm_prepare()
1941 dpm_wait(dev, subordinate->power.async_suspend); in device_pm_wait_for_dev()
1962 list_for_each_entry(dev, &dpm_list, power.entry) in dpm_for_each_dev()
1987 spin_lock_irqsave(&dev->power.lock, flags); in device_pm_check_callbacks()
1988 dev->power.no_pm_callbacks = in device_pm_check_callbacks()
1996 spin_unlock_irqrestore(&dev->power.lock, flags); in device_pm_check_callbacks()