Lines Matching full:pm

18 #define pr_fmt(fmt) "PM: " fmt
23 #include <linux/pm.h>
25 #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.
235 * dpm_wait - Wait for a PM operation to complete.
344 * pm_op - Return the PM operation appropriate for given PM event.
345 * @ops: PM operations to choose from.
346 * @state: PM transition of the system being carried out.
375 * pm_late_early_op - Return the PM operation appropriate for given PM event.
376 * @ops: PM operations to choose from.
377 * @state: PM transition of the system being carried out.
379 * Runtime PM is disabled for @dev while this function is being executed.
409 * pm_noirq_op - Return the PM operation appropriate for given PM event.
410 * @ops: PM operations to choose from.
411 * @state: PM transition of the system being carried out.
510 * @t: The timer that PM watchdog depends on.
527 * dpm_watchdog_set - Enable pm watchdog for given device.
587 * @state: PM transition of the system being carried out.
616 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
619 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
631 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
633 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
634 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
636 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
637 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
639 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
647 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
649 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
741 * @state: PM transition of the system being carried out.
759 * @state: PM transition of the system being carried out.
762 * Runtime PM is disabled for @dev while this function is being executed.
785 } else if (dev->type && dev->type->pm) { in device_resume_early()
787 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
788 } else if (dev->class && dev->class->pm) { in device_resume_early()
790 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
791 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
793 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
801 if (dev->driver && dev->driver->pm) { in device_resume_early()
803 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
834 * @state: PM transition of the system being carried out.
881 * @state: PM transition of the system being carried out.
893 * @state: PM transition of the system being carried out.
936 if (dev->type && dev->type->pm) { in device_resume()
938 callback = pm_op(dev->type->pm, state); in device_resume()
942 if (dev->class && dev->class->pm) { in device_resume()
944 callback = pm_op(dev->class->pm, state); in device_resume()
949 if (dev->bus->pm) { in device_resume()
951 callback = pm_op(dev->bus->pm, state); in device_resume()
960 if (!callback && dev->driver && dev->driver->pm) { in device_resume()
962 callback = pm_op(dev->driver->pm, state); in device_resume()
994 * @state: PM transition of the system being carried out.
1046 * device_complete - Complete a PM transition for given device.
1048 * @state: PM transition of the system being carried out.
1063 } else if (dev->type && dev->type->pm) { in device_complete()
1065 callback = dev->type->pm->complete; in device_complete()
1066 } else if (dev->class && dev->class->pm) { in device_complete()
1068 callback = dev->class->pm->complete; in device_complete()
1069 } else if (dev->bus && dev->bus->pm) { in device_complete()
1071 callback = dev->bus->pm->complete; in device_complete()
1074 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1076 callback = dev->driver->pm->complete; in device_complete()
1090 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1091 * @state: PM transition of the system being carried out.
1093 * Execute the ->complete() callbacks for all devices whose PM status is not
1130 * @state: PM transition of the system being carried out.
1132 * Execute "resume" callbacks for all devices and complete the PM transition of
1147 * @sleep_state: PM message representing a sleep state.
1149 * Return a PM message representing the resume event corresponding to given
1185 * @state: PM transition of the system being carried out.
1211 } else if (dev->type && dev->type->pm) { in __device_suspend_noirq()
1213 callback = pm_noirq_op(dev->type->pm, state); in __device_suspend_noirq()
1214 } else if (dev->class && dev->class->pm) { in __device_suspend_noirq()
1216 callback = pm_noirq_op(dev->class->pm, state); in __device_suspend_noirq()
1217 } else if (dev->bus && dev->bus->pm) { in __device_suspend_noirq()
1219 callback = pm_noirq_op(dev->bus->pm, state); in __device_suspend_noirq()
1227 if (dev->driver && dev->driver->pm) { in __device_suspend_noirq()
1229 callback = pm_noirq_op(dev->driver->pm, state); in __device_suspend_noirq()
1244 * system suspend (as indicated by their PM-runtime usage counters) in __device_suspend_noirq()
1332 * @state: PM transition of the system being carried out.
1371 * @state: PM transition of the system being carried out.
1374 * Runtime PM is disabled for @dev while this function is being executed.
1403 } else if (dev->type && dev->type->pm) { in __device_suspend_late()
1405 callback = pm_late_early_op(dev->type->pm, state); in __device_suspend_late()
1406 } else if (dev->class && dev->class->pm) { in __device_suspend_late()
1408 callback = pm_late_early_op(dev->class->pm, state); in __device_suspend_late()
1409 } else if (dev->bus && dev->bus->pm) { in __device_suspend_late()
1411 callback = pm_late_early_op(dev->bus->pm, state); in __device_suspend_late()
1419 if (dev->driver && dev->driver->pm) { in __device_suspend_late()
1421 callback = pm_late_early_op(dev->driver->pm, state); in __device_suspend_late()
1464 * @state: PM transition of the system being carried out.
1515 * @state: PM transition of the system being carried out.
1539 * @state: PM transition of the system being carried out.
1587 * @state: PM transition of the system being carried out.
1608 * Wait for possible runtime PM transitions of the device in progress in __device_suspend()
1614 * of the device, they must disable runtime PM for it or otherwise in __device_suspend()
1658 if (dev->type && dev->type->pm) { in __device_suspend()
1660 callback = pm_op(dev->type->pm, state); in __device_suspend()
1664 if (dev->class && dev->class->pm) { in __device_suspend()
1666 callback = pm_op(dev->class->pm, state); in __device_suspend()
1671 if (dev->bus->pm) { in __device_suspend()
1673 callback = pm_op(dev->bus->pm, state); in __device_suspend()
1683 if (!callback && dev->driver && dev->driver->pm) { in __device_suspend()
1685 callback = pm_op(dev->driver->pm, state); in __device_suspend()
1736 * @state: PM transition of the system being carried out.
1789 * @state: PM transition of the system being carried out.
1819 else if (dev->type && dev->type->pm) in device_prepare()
1820 callback = dev->type->pm->prepare; in device_prepare()
1821 else if (dev->class && dev->class->pm) in device_prepare()
1822 callback = dev->class->pm->prepare; in device_prepare()
1823 else if (dev->bus && dev->bus->pm) in device_prepare()
1824 callback = dev->bus->pm->prepare; in device_prepare()
1826 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1827 callback = dev->driver->pm->prepare; in device_prepare()
1856 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1857 * @state: PM transition of the system being carried out.
1916 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1917 * @state: PM transition of the system being carried out.
1919 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
1998 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
2000 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
2001 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2003 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()