Lines Matching full:pm

18 #define pr_fmt(fmt) "PM: " fmt
24 #include <linux/pm.h>
26 #include <linux/pm-trace.h>
88 return "(unknown PM event)"; in pm_verb()
109 * device_pm_lock - Lock the list of active devices used by the PM core.
117 * device_pm_unlock - Unlock the list of active devices used by the PM core.
125 * device_pm_add - Add a device to the PM core's list of active devices.
130 /* Skip PM setup/initialization. */ in device_pm_add()
147 * device_pm_remove - Remove a device from the PM core's list of active devices.
168 * device_pm_move_before - Move device in the PM core's list of active devices.
182 * device_pm_move_after - Move device in the PM core's list of active devices.
196 * device_pm_move_last - Move device to end of the PM core's list of devices.
231 * dpm_wait - Wait for a PM operation to complete.
340 * pm_op - Return the PM operation appropriate for given PM event.
341 * @ops: PM operations to choose from.
342 * @state: PM transition of the system being carried out.
371 * pm_late_early_op - Return the PM operation appropriate for given PM event.
372 * @ops: PM operations to choose from.
373 * @state: PM transition of the system being carried out.
375 * Runtime PM is disabled for @dev while this function is being executed.
405 * pm_noirq_op - Return the PM operation appropriate for given PM event.
406 * @ops: PM operations to choose from.
407 * @state: PM transition of the system being carried out.
506 * @t: The timer that PM watchdog depends on.
523 * dpm_watchdog_set - Enable pm watchdog for given device.
612 * @state: PM transition of the system being carried out.
641 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
644 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
656 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
658 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
659 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
661 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
662 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
664 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
672 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
674 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
748 * @state: PM transition of the system being carried out.
764 * @state: PM transition of the system being carried out.
767 * Runtime PM is disabled for @dev while this function is being executed.
790 } else if (dev->type && dev->type->pm) { in device_resume_early()
792 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
793 } else if (dev->class && dev->class->pm) { in device_resume_early()
795 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
796 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
798 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
806 if (dev->driver && dev->driver->pm) { in device_resume_early()
808 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
840 * @state: PM transition of the system being carried out.
888 * @state: PM transition of the system being carried out.
900 * @state: PM transition of the system being carried out.
943 if (dev->type && dev->type->pm) { in device_resume()
945 callback = pm_op(dev->type->pm, state); in device_resume()
949 if (dev->class && dev->class->pm) { in device_resume()
951 callback = pm_op(dev->class->pm, state); in device_resume()
956 if (dev->bus->pm) { in device_resume()
958 callback = pm_op(dev->bus->pm, state); in device_resume()
967 if (!callback && dev->driver && dev->driver->pm) { in device_resume()
969 callback = pm_op(dev->driver->pm, state); in device_resume()
1002 * @state: PM transition of the system being carried out.
1055 * device_complete - Complete a PM transition for given device.
1057 * @state: PM transition of the system being carried out.
1072 } else if (dev->type && dev->type->pm) { in device_complete()
1074 callback = dev->type->pm->complete; in device_complete()
1075 } else if (dev->class && dev->class->pm) { in device_complete()
1077 callback = dev->class->pm->complete; in device_complete()
1078 } else if (dev->bus && dev->bus->pm) { in device_complete()
1080 callback = dev->bus->pm->complete; in device_complete()
1083 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1085 callback = dev->driver->pm->complete; in device_complete()
1100 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1101 * @state: PM transition of the system being carried out.
1103 * Execute the ->complete() callbacks for all devices whose PM status is not
1142 * @state: PM transition of the system being carried out.
1144 * Execute "resume" callbacks for all devices and complete the PM transition of
1159 * @sleep_state: PM message representing a sleep state.
1161 * Return a PM message representing the resume event corresponding to given
1197 * @state: PM transition of the system being carried out.
1223 } else if (dev->type && dev->type->pm) { in device_suspend_noirq()
1225 callback = pm_noirq_op(dev->type->pm, state); in device_suspend_noirq()
1226 } else if (dev->class && dev->class->pm) { in device_suspend_noirq()
1228 callback = pm_noirq_op(dev->class->pm, state); in device_suspend_noirq()
1229 } else if (dev->bus && dev->bus->pm) { in device_suspend_noirq()
1231 callback = pm_noirq_op(dev->bus->pm, state); in device_suspend_noirq()
1239 if (dev->driver && dev->driver->pm) { in device_suspend_noirq()
1241 callback = pm_noirq_op(dev->driver->pm, state); in device_suspend_noirq()
1258 * system suspend (as indicated by their PM-runtime usage counters) in device_suspend_noirq()
1334 * @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()
1453 * @state: PM transition of the system being carried out.
1508 * @state: PM transition of the system being carried out.
1532 * @state: PM transition of the system being carried out.
1580 * @state: PM transition of the system being carried out.
1601 * Wait for possible runtime PM transitions of the device in progress in device_suspend()
1607 * of the device, they must disable runtime PM for it or otherwise in device_suspend()
1651 if (dev->type && dev->type->pm) { in device_suspend()
1653 callback = pm_op(dev->type->pm, state); in device_suspend()
1657 if (dev->class && dev->class->pm) { in device_suspend()
1659 callback = pm_op(dev->class->pm, state); in device_suspend()
1664 if (dev->bus->pm) { in device_suspend()
1666 callback = pm_op(dev->bus->pm, state); in device_suspend()
1676 if (!callback && dev->driver && dev->driver->pm) { in device_suspend()
1678 callback = pm_op(dev->driver->pm, state); in device_suspend()
1718 * @state: PM transition of the system being carried out.
1775 * @state: PM transition of the system being carried out.
1805 else if (dev->type && dev->type->pm) in device_prepare()
1806 callback = dev->type->pm->prepare; in device_prepare()
1807 else if (dev->class && dev->class->pm) in device_prepare()
1808 callback = dev->class->pm->prepare; in device_prepare()
1809 else if (dev->bus && dev->bus->pm) in device_prepare()
1810 callback = dev->bus->pm->prepare; in device_prepare()
1812 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1813 callback = dev->driver->pm->prepare; in device_prepare()
1842 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1843 * @state: PM transition of the system being carried out.
1905 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1906 * @state: PM transition of the system being carried out.
1908 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
1989 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
1991 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
1992 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
1994 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()