Lines Matching full:pm
18 #define pr_fmt(fmt) "PM: " fmt
24 #include <linux/pm.h>
26 #include <linux/pm-trace.h>
103 return "(unknown PM event)"; in pm_verb()
124 * device_pm_lock - Lock the list of active devices used by the PM core.
132 * device_pm_unlock - Unlock the list of active devices used by the PM core.
140 * device_pm_add - Add a device to the PM core's list of active devices.
145 /* Skip PM setup/initialization. */ in device_pm_add()
162 * device_pm_remove - Remove a device from the PM core's list of active devices.
183 * device_pm_move_before - Move device in the PM core's list of active devices.
197 * device_pm_move_after - Move device in the PM core's list of active devices.
211 * device_pm_move_last - Move device to end of the PM core's list of devices.
246 * dpm_wait - Wait for a PM operation to complete.
355 * pm_op - Return the PM operation appropriate for given PM event.
356 * @ops: PM operations to choose from.
357 * @state: PM transition of the system being carried out.
386 * pm_late_early_op - Return the PM operation appropriate for given PM event.
387 * @ops: PM operations to choose from.
388 * @state: PM transition of the system being carried out.
390 * Runtime PM is disabled for @dev while this function is being executed.
420 * pm_noirq_op - Return the PM operation appropriate for given PM event.
421 * @ops: PM operations to choose from.
422 * @state: PM transition of the system being carried out.
522 * @t: The timer that PM watchdog depends on.
551 * dpm_watchdog_set - Enable pm watchdog for given device.
708 * @state: PM transition of the system being carried out.
737 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
740 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
742 * which case it is not necessary to update its PM-runtime status. in device_resume_noirq()
752 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
754 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
755 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
757 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
758 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
760 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
768 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
770 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
849 * @state: PM transition of the system being carried out.
867 * @state: PM transition of the system being carried out.
870 * Runtime PM is disabled for @dev while this function is being executed.
893 } else if (dev->type && dev->type->pm) { in device_resume_early()
895 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
896 } else if (dev->class && dev->class->pm) { in device_resume_early()
898 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
899 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
901 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
909 if (dev->driver && dev->driver->pm) { in device_resume_early()
911 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
945 * @state: PM transition of the system being carried out.
996 * @state: PM transition of the system being carried out.
1010 * @state: PM transition of the system being carried out.
1034 * point if it has no PM callbacks. in device_resume()
1062 if (dev->type && dev->type->pm) { in device_resume()
1064 callback = pm_op(dev->type->pm, state); in device_resume()
1068 if (dev->class && dev->class->pm) { in device_resume()
1070 callback = pm_op(dev->class->pm, state); in device_resume()
1075 if (dev->bus->pm) { in device_resume()
1077 callback = pm_op(dev->bus->pm, state); in device_resume()
1086 if (!callback && dev->driver && dev->driver->pm) { in device_resume()
1088 callback = pm_op(dev->driver->pm, state); in device_resume()
1121 * @state: PM transition of the system being carried out.
1176 * device_complete - Complete a PM transition for given device.
1178 * @state: PM transition of the system being carried out.
1193 } else if (dev->type && dev->type->pm) { in device_complete()
1195 callback = dev->type->pm->complete; in device_complete()
1196 } else if (dev->class && dev->class->pm) { in device_complete()
1198 callback = dev->class->pm->complete; in device_complete()
1199 } else if (dev->bus && dev->bus->pm) { in device_complete()
1201 callback = dev->bus->pm->complete; in device_complete()
1204 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1206 callback = dev->driver->pm->complete; in device_complete()
1217 /* If enabling runtime PM for the device is blocked, unblock it. */ in device_complete()
1223 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1224 * @state: PM transition of the system being carried out.
1226 * Execute the ->complete() callbacks for all devices whose PM status is not
1264 * @state: PM transition of the system being carried out.
1266 * Execute "resume" callbacks for all devices and complete the PM transition of
1358 * @sleep_state: PM message representing a sleep state.
1360 * Return a PM message representing the resume event corresponding to given
1398 * @state: PM transition of the system being carried out.
1424 } else if (dev->type && dev->type->pm) { in device_suspend_noirq()
1426 callback = pm_noirq_op(dev->type->pm, state); in device_suspend_noirq()
1427 } else if (dev->class && dev->class->pm) { in device_suspend_noirq()
1429 callback = pm_noirq_op(dev->class->pm, state); in device_suspend_noirq()
1430 } else if (dev->bus && dev->bus->pm) { in device_suspend_noirq()
1432 callback = pm_noirq_op(dev->bus->pm, state); in device_suspend_noirq()
1440 if (dev->driver && dev->driver->pm) { in device_suspend_noirq()
1442 callback = pm_noirq_op(dev->driver->pm, state); in device_suspend_noirq()
1461 * runtime PM usage counters and child counters) would be suboptimal. in device_suspend_noirq()
1555 * @state: PM transition of the system being carried out.
1594 * @state: PM transition of the system being carried out.
1597 * Runtime PM is disabled for @dev while this function is being executed.
1609 * Disable runtime PM for the device without checking if there is a in device_suspend_late()
1630 } else if (dev->type && dev->type->pm) { in device_suspend_late()
1632 callback = pm_late_early_op(dev->type->pm, state); in device_suspend_late()
1633 } else if (dev->class && dev->class->pm) { in device_suspend_late()
1635 callback = pm_late_early_op(dev->class->pm, state); in device_suspend_late()
1636 } else if (dev->bus && dev->bus->pm) { in device_suspend_late()
1638 callback = pm_late_early_op(dev->bus->pm, state); in device_suspend_late()
1646 if (dev->driver && dev->driver->pm) { in device_suspend_late()
1648 callback = pm_late_early_op(dev->driver->pm, state); in device_suspend_late()
1684 * @state: PM transition of the system being carried out.
1756 * @state: PM transition of the system being carried out.
1780 * @state: PM transition of the system being carried out.
1830 * @state: PM transition of the system being carried out.
1851 * Wait for possible runtime PM transitions of the device in progress in device_suspend()
1857 * of the device, they must disable runtime PM for it or otherwise in device_suspend()
1902 if (dev->type && dev->type->pm) { in device_suspend()
1904 callback = pm_op(dev->type->pm, state); in device_suspend()
1908 if (dev->class && dev->class->pm) { in device_suspend()
1910 callback = pm_op(dev->class->pm, state); in device_suspend()
1915 if (dev->bus->pm) { in device_suspend()
1917 callback = pm_op(dev->bus->pm, state); in device_suspend()
1927 if (!callback && dev->driver && dev->driver->pm) { in device_suspend()
1929 callback = pm_op(dev->driver->pm, state); in device_suspend()
1973 * @state: PM transition of the system being carried out.
2052 * for it and for devices without PM callbacks. in device_prepare_smart_suspend()
2055 * or any of its suppliers that take runtime PM into account, it cannot in device_prepare_smart_suspend()
2087 * @state: PM transition of the system being carried out.
2106 * If runtime PM is disabled for the device at this point and it has in device_prepare()
2125 else if (dev->type && dev->type->pm) in device_prepare()
2126 callback = dev->type->pm->prepare; in device_prepare()
2127 else if (dev->class && dev->class->pm) in device_prepare()
2128 callback = dev->class->pm->prepare; in device_prepare()
2129 else if (dev->bus && dev->bus->pm) in device_prepare()
2130 callback = dev->bus->pm->prepare; in device_prepare()
2132 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
2133 callback = dev->driver->pm->prepare; in device_prepare()
2146 /* Do not enable "smart suspend" for devices with disabled runtime PM. */ in device_prepare()
2170 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
2171 * @state: PM transition of the system being carried out.
2232 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
2233 * @state: PM transition of the system being carried out.
2235 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
2318 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
2320 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
2321 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2323 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()