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()
740 * @state: PM transition of the system being carried out.
756 * @state: PM transition of the system being carried out.
759 * Runtime PM is disabled for @dev while this function is being executed.
782 } else if (dev->type && dev->type->pm) { in device_resume_early()
784 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
785 } else if (dev->class && dev->class->pm) { in device_resume_early()
787 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
788 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
790 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
798 if (dev->driver && dev->driver->pm) { in device_resume_early()
800 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
831 * @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.
1051 * device_complete - Complete a PM transition for given device.
1053 * @state: PM transition of the system being carried out.
1068 } else if (dev->type && dev->type->pm) { in device_complete()
1070 callback = dev->type->pm->complete; in device_complete()
1071 } else if (dev->class && dev->class->pm) { in device_complete()
1073 callback = dev->class->pm->complete; in device_complete()
1074 } else if (dev->bus && dev->bus->pm) { in device_complete()
1076 callback = dev->bus->pm->complete; in device_complete()
1079 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1081 callback = dev->driver->pm->complete; in device_complete()
1096 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1097 * @state: PM transition of the system being carried out.
1099 * Execute the ->complete() callbacks for all devices whose PM status is not
1138 * @state: PM transition of the system being carried out.
1140 * Execute "resume" callbacks for all devices and complete the PM transition of
1155 * @sleep_state: PM message representing a sleep state.
1157 * Return a PM message representing the resume event corresponding to given
1193 * @state: PM transition of the system being carried out.
1219 } else if (dev->type && dev->type->pm) { in __device_suspend_noirq()
1221 callback = pm_noirq_op(dev->type->pm, state); in __device_suspend_noirq()
1222 } else if (dev->class && dev->class->pm) { in __device_suspend_noirq()
1224 callback = pm_noirq_op(dev->class->pm, state); in __device_suspend_noirq()
1225 } else if (dev->bus && dev->bus->pm) { in __device_suspend_noirq()
1227 callback = pm_noirq_op(dev->bus->pm, state); in __device_suspend_noirq()
1235 if (dev->driver && dev->driver->pm) { in __device_suspend_noirq()
1237 callback = pm_noirq_op(dev->driver->pm, state); in __device_suspend_noirq()
1252 * system suspend (as indicated by their PM-runtime usage counters) in __device_suspend_noirq()
1344 * @state: PM transition of the system being carried out.
1381 * @state: PM transition of the system being carried out.
1384 * Runtime PM is disabled for @dev while this function is being executed.
1413 } else if (dev->type && dev->type->pm) { in __device_suspend_late()
1415 callback = pm_late_early_op(dev->type->pm, state); in __device_suspend_late()
1416 } else if (dev->class && dev->class->pm) { in __device_suspend_late()
1418 callback = pm_late_early_op(dev->class->pm, state); in __device_suspend_late()
1419 } else if (dev->bus && dev->bus->pm) { in __device_suspend_late()
1421 callback = pm_late_early_op(dev->bus->pm, state); in __device_suspend_late()
1429 if (dev->driver && dev->driver->pm) { in __device_suspend_late()
1431 callback = pm_late_early_op(dev->driver->pm, state); in __device_suspend_late()
1474 * @state: PM transition of the system being carried out.
1531 * @state: PM transition of the system being carried out.
1555 * @state: PM transition of the system being carried out.
1603 * @state: PM transition of the system being carried out.
1624 * Wait for possible runtime PM transitions of the device in progress in __device_suspend()
1630 * of the device, they must disable runtime PM for it or otherwise in __device_suspend()
1674 if (dev->type && dev->type->pm) { in __device_suspend()
1676 callback = pm_op(dev->type->pm, state); in __device_suspend()
1680 if (dev->class && dev->class->pm) { in __device_suspend()
1682 callback = pm_op(dev->class->pm, state); in __device_suspend()
1687 if (dev->bus->pm) { in __device_suspend()
1689 callback = pm_op(dev->bus->pm, state); in __device_suspend()
1699 if (!callback && dev->driver && dev->driver->pm) { in __device_suspend()
1701 callback = pm_op(dev->driver->pm, state); in __device_suspend()
1752 * @state: PM transition of the system being carried out.
1811 * @state: PM transition of the system being carried out.
1841 else if (dev->type && dev->type->pm) in device_prepare()
1842 callback = dev->type->pm->prepare; in device_prepare()
1843 else if (dev->class && dev->class->pm) in device_prepare()
1844 callback = dev->class->pm->prepare; in device_prepare()
1845 else if (dev->bus && dev->bus->pm) in device_prepare()
1846 callback = dev->bus->pm->prepare; in device_prepare()
1848 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1849 callback = dev->driver->pm->prepare; in device_prepare()
1878 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1879 * @state: PM transition of the system being carried out.
1941 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1942 * @state: PM transition of the system being carried out.
1944 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
2025 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
2027 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
2028 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2030 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()