Lines Matching full:pm

18 #define pr_fmt(fmt) "PM: " fmt
24 #include <linux/pm.h>
26 #include <linux/pm-trace.h>
89 return "(unknown PM event)"; in pm_verb()
110 * device_pm_lock - Lock the list of active devices used by the PM core.
118 * device_pm_unlock - Unlock the list of active devices used by the PM core.
126 * device_pm_add - Add a device to the PM core's list of active devices.
131 /* Skip PM setup/initialization. */ in device_pm_add()
148 * device_pm_remove - Remove a device from the PM core's list of active devices.
169 * device_pm_move_before - Move device in the PM core's list of active devices.
183 * device_pm_move_after - Move device in the PM core's list of active devices.
197 * device_pm_move_last - Move device to end of the PM core's list of devices.
232 * dpm_wait - Wait for a PM operation to complete.
341 * pm_op - Return the PM operation appropriate for given PM event.
342 * @ops: PM operations to choose from.
343 * @state: PM transition of the system being carried out.
372 * pm_late_early_op - Return the PM operation appropriate for given PM event.
373 * @ops: PM operations to choose from.
374 * @state: PM transition of the system being carried out.
376 * Runtime PM is disabled for @dev while this function is being executed.
406 * pm_noirq_op - Return the PM operation appropriate for given PM event.
407 * @ops: PM operations to choose from.
408 * @state: PM transition of the system being carried out.
507 * @t: The timer that PM watchdog depends on.
524 * dpm_watchdog_set - Enable pm watchdog for given device.
584 * @state: PM transition of the system being carried out.
613 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
616 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
628 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
630 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
631 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
633 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
634 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
636 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
644 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
646 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
744 * @state: PM transition of the system being carried out.
760 * @state: PM transition of the system being carried out.
763 * Runtime PM is disabled for @dev while this function is being executed.
786 } else if (dev->type && dev->type->pm) { in device_resume_early()
788 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
789 } else if (dev->class && dev->class->pm) { in device_resume_early()
791 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
792 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
794 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
802 if (dev->driver && dev->driver->pm) { in device_resume_early()
804 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
837 * @state: PM transition of the system being carried out.
879 * @state: PM transition of the system being carried out.
891 * @state: PM transition of the system being carried out.
934 if (dev->type && dev->type->pm) { in device_resume()
936 callback = pm_op(dev->type->pm, state); in device_resume()
940 if (dev->class && dev->class->pm) { in device_resume()
942 callback = pm_op(dev->class->pm, state); in device_resume()
947 if (dev->bus->pm) { in device_resume()
949 callback = pm_op(dev->bus->pm, state); in device_resume()
958 if (!callback && dev->driver && dev->driver->pm) { in device_resume()
960 callback = pm_op(dev->driver->pm, state); in device_resume()
994 * @state: PM transition of the system being carried out.
1050 * device_complete - Complete a PM transition for given device.
1052 * @state: PM transition of the system being carried out.
1067 } else if (dev->type && dev->type->pm) { in device_complete()
1069 callback = dev->type->pm->complete; in device_complete()
1070 } else if (dev->class && dev->class->pm) { in device_complete()
1072 callback = dev->class->pm->complete; in device_complete()
1073 } else if (dev->bus && dev->bus->pm) { in device_complete()
1075 callback = dev->bus->pm->complete; in device_complete()
1078 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1080 callback = dev->driver->pm->complete; in device_complete()
1095 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1096 * @state: PM transition of the system being carried out.
1098 * Execute the ->complete() callbacks for all devices whose PM status is not
1137 * @state: PM transition of the system being carried out.
1139 * Execute "resume" callbacks for all devices and complete the PM transition of
1154 * @sleep_state: PM message representing a sleep state.
1156 * Return a PM message representing the resume event corresponding to given
1192 * @state: PM transition of the system being carried out.
1218 } else if (dev->type && dev->type->pm) { in __device_suspend_noirq()
1220 callback = pm_noirq_op(dev->type->pm, state); in __device_suspend_noirq()
1221 } else if (dev->class && dev->class->pm) { in __device_suspend_noirq()
1223 callback = pm_noirq_op(dev->class->pm, state); in __device_suspend_noirq()
1224 } else if (dev->bus && dev->bus->pm) { in __device_suspend_noirq()
1226 callback = pm_noirq_op(dev->bus->pm, state); in __device_suspend_noirq()
1234 if (dev->driver && dev->driver->pm) { in __device_suspend_noirq()
1236 callback = pm_noirq_op(dev->driver->pm, state); in __device_suspend_noirq()
1251 * system suspend (as indicated by their PM-runtime usage counters) in __device_suspend_noirq()
1343 * @state: PM transition of the system being carried out.
1380 * @state: PM transition of the system being carried out.
1383 * Runtime PM is disabled for @dev while this function is being executed.
1412 } else if (dev->type && dev->type->pm) { in __device_suspend_late()
1414 callback = pm_late_early_op(dev->type->pm, state); in __device_suspend_late()
1415 } else if (dev->class && dev->class->pm) { in __device_suspend_late()
1417 callback = pm_late_early_op(dev->class->pm, state); in __device_suspend_late()
1418 } else if (dev->bus && dev->bus->pm) { in __device_suspend_late()
1420 callback = pm_late_early_op(dev->bus->pm, state); in __device_suspend_late()
1428 if (dev->driver && dev->driver->pm) { in __device_suspend_late()
1430 callback = pm_late_early_op(dev->driver->pm, state); in __device_suspend_late()
1473 * @state: PM transition of the system being carried out.
1530 * @state: PM transition of the system being carried out.
1554 * @state: PM transition of the system being carried out.
1602 * @state: PM transition of the system being carried out.
1623 * Wait for possible runtime PM transitions of the device in progress in __device_suspend()
1629 * of the device, they must disable runtime PM for it or otherwise in __device_suspend()
1673 if (dev->type && dev->type->pm) { in __device_suspend()
1675 callback = pm_op(dev->type->pm, state); in __device_suspend()
1679 if (dev->class && dev->class->pm) { in __device_suspend()
1681 callback = pm_op(dev->class->pm, state); in __device_suspend()
1686 if (dev->bus->pm) { in __device_suspend()
1688 callback = pm_op(dev->bus->pm, state); in __device_suspend()
1698 if (!callback && dev->driver && dev->driver->pm) { in __device_suspend()
1700 callback = pm_op(dev->driver->pm, state); in __device_suspend()
1751 * @state: PM transition of the system being carried out.
1810 * @state: PM transition of the system being carried out.
1840 else if (dev->type && dev->type->pm) in device_prepare()
1841 callback = dev->type->pm->prepare; in device_prepare()
1842 else if (dev->class && dev->class->pm) in device_prepare()
1843 callback = dev->class->pm->prepare; in device_prepare()
1844 else if (dev->bus && dev->bus->pm) in device_prepare()
1845 callback = dev->bus->pm->prepare; in device_prepare()
1847 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1848 callback = dev->driver->pm->prepare; in device_prepare()
1877 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1878 * @state: PM transition of the system being carried out.
1940 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1941 * @state: PM transition of the system being carried out.
1943 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
2024 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
2026 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
2027 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2029 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()