Lines Matching full:pm
18 #define pr_fmt(fmt) "PM: " fmt
24 #include <linux/pm.h>
26 #include <linux/pm-trace.h>
90 return "(unknown PM event)"; in pm_verb()
111 * device_pm_lock - Lock the list of active devices used by the PM core.
119 * device_pm_unlock - Unlock the list of active devices used by the PM core.
127 * device_pm_add - Add a device to the PM core's list of active devices.
132 /* Skip PM setup/initialization. */ in device_pm_add()
149 * device_pm_remove - Remove a device from the PM core's list of active devices.
170 * device_pm_move_before - Move device in the PM core's list of active devices.
184 * device_pm_move_after - Move device in the PM core's list of active devices.
198 * device_pm_move_last - Move device to end of the PM core's list of devices.
233 * dpm_wait - Wait for a PM operation to complete.
342 * pm_op - Return the PM operation appropriate for given PM event.
343 * @ops: PM operations to choose from.
344 * @state: PM transition of the system being carried out.
373 * pm_late_early_op - Return the PM operation appropriate for given PM event.
374 * @ops: PM operations to choose from.
375 * @state: PM transition of the system being carried out.
377 * Runtime PM is disabled for @dev while this function is being executed.
407 * pm_noirq_op - Return the PM operation appropriate for given PM event.
408 * @ops: PM operations to choose from.
409 * @state: PM transition of the system being carried out.
508 * @t: The timer that PM watchdog depends on.
525 * dpm_watchdog_set - Enable pm watchdog for given device.
585 * @state: PM transition of the system being carried out.
614 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
617 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
629 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
631 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
632 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
634 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
635 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
637 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
645 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
647 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
739 * @state: PM transition of the system being carried out.
757 * @state: PM transition of the system being carried out.
760 * Runtime PM is disabled for @dev while this function is being executed.
783 } else if (dev->type && dev->type->pm) { in device_resume_early()
785 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
786 } else if (dev->class && dev->class->pm) { in device_resume_early()
788 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
789 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
791 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
799 if (dev->driver && dev->driver->pm) { in device_resume_early()
801 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
832 * @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()
992 * @state: PM transition of the system being carried out.
1044 * device_complete - Complete a PM transition for given device.
1046 * @state: PM transition of the system being carried out.
1061 } else if (dev->type && dev->type->pm) { in device_complete()
1063 callback = dev->type->pm->complete; in device_complete()
1064 } else if (dev->class && dev->class->pm) { in device_complete()
1066 callback = dev->class->pm->complete; in device_complete()
1067 } else if (dev->bus && dev->bus->pm) { in device_complete()
1069 callback = dev->bus->pm->complete; in device_complete()
1072 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1074 callback = dev->driver->pm->complete; in device_complete()
1088 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1089 * @state: PM transition of the system being carried out.
1091 * Execute the ->complete() callbacks for all devices whose PM status is not
1128 * @state: PM transition of the system being carried out.
1130 * Execute "resume" callbacks for all devices and complete the PM transition of
1145 * @sleep_state: PM message representing a sleep state.
1147 * Return a PM message representing the resume event corresponding to given
1183 * @state: PM transition of the system being carried out.
1209 } else if (dev->type && dev->type->pm) { in __device_suspend_noirq()
1211 callback = pm_noirq_op(dev->type->pm, state); in __device_suspend_noirq()
1212 } else if (dev->class && dev->class->pm) { in __device_suspend_noirq()
1214 callback = pm_noirq_op(dev->class->pm, state); in __device_suspend_noirq()
1215 } else if (dev->bus && dev->bus->pm) { in __device_suspend_noirq()
1217 callback = pm_noirq_op(dev->bus->pm, state); in __device_suspend_noirq()
1225 if (dev->driver && dev->driver->pm) { in __device_suspend_noirq()
1227 callback = pm_noirq_op(dev->driver->pm, state); in __device_suspend_noirq()
1242 * system suspend (as indicated by their PM-runtime usage counters) in __device_suspend_noirq()
1330 * @state: PM transition of the system being carried out.
1369 * @state: PM transition of the system being carried out.
1372 * Runtime PM is disabled for @dev while this function is being executed.
1401 } else if (dev->type && dev->type->pm) { in __device_suspend_late()
1403 callback = pm_late_early_op(dev->type->pm, state); in __device_suspend_late()
1404 } else if (dev->class && dev->class->pm) { in __device_suspend_late()
1406 callback = pm_late_early_op(dev->class->pm, state); in __device_suspend_late()
1407 } else if (dev->bus && dev->bus->pm) { in __device_suspend_late()
1409 callback = pm_late_early_op(dev->bus->pm, state); in __device_suspend_late()
1417 if (dev->driver && dev->driver->pm) { in __device_suspend_late()
1419 callback = pm_late_early_op(dev->driver->pm, state); in __device_suspend_late()
1462 * @state: PM transition of the system being carried out.
1513 * @state: PM transition of the system being carried out.
1537 * @state: PM transition of the system being carried out.
1585 * @state: PM transition of the system being carried out.
1606 * Wait for possible runtime PM transitions of the device in progress in __device_suspend()
1612 * of the device, they must disable runtime PM for it or otherwise in __device_suspend()
1656 if (dev->type && dev->type->pm) { in __device_suspend()
1658 callback = pm_op(dev->type->pm, state); in __device_suspend()
1662 if (dev->class && dev->class->pm) { in __device_suspend()
1664 callback = pm_op(dev->class->pm, state); in __device_suspend()
1669 if (dev->bus->pm) { in __device_suspend()
1671 callback = pm_op(dev->bus->pm, state); in __device_suspend()
1681 if (!callback && dev->driver && dev->driver->pm) { in __device_suspend()
1683 callback = pm_op(dev->driver->pm, state); in __device_suspend()
1734 * @state: PM transition of the system being carried out.
1787 * @state: PM transition of the system being carried out.
1817 else if (dev->type && dev->type->pm) in device_prepare()
1818 callback = dev->type->pm->prepare; in device_prepare()
1819 else if (dev->class && dev->class->pm) in device_prepare()
1820 callback = dev->class->pm->prepare; in device_prepare()
1821 else if (dev->bus && dev->bus->pm) in device_prepare()
1822 callback = dev->bus->pm->prepare; in device_prepare()
1824 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1825 callback = dev->driver->pm->prepare; in device_prepare()
1854 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1855 * @state: PM transition of the system being carried out.
1914 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1915 * @state: PM transition of the system being carried out.
1917 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
1996 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
1998 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
1999 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2001 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()