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.
507 * @t: The timer that PM watchdog depends on.
536 * dpm_watchdog_set - Enable pm watchdog for given device.
626 * @state: PM transition of the system being carried out.
655 * this device later, it needs to appear as "suspended" to PM-runtime, in device_resume_noirq()
658 * Otherwise, the device is going to be resumed, so set its PM-runtime in device_resume_noirq()
660 * which case it is not necessary to update its PM-runtime status. in device_resume_noirq()
672 } else if (dev->type && dev->type->pm) { in device_resume_noirq()
674 callback = pm_noirq_op(dev->type->pm, state); in device_resume_noirq()
675 } else if (dev->class && dev->class->pm) { in device_resume_noirq()
677 callback = pm_noirq_op(dev->class->pm, state); in device_resume_noirq()
678 } else if (dev->bus && dev->bus->pm) { in device_resume_noirq()
680 callback = pm_noirq_op(dev->bus->pm, state); in device_resume_noirq()
688 if (dev->driver && dev->driver->pm) { in device_resume_noirq()
690 callback = pm_noirq_op(dev->driver->pm, state); in device_resume_noirq()
764 * @state: PM transition of the system being carried out.
780 * @state: PM transition of the system being carried out.
783 * Runtime PM is disabled for @dev while this function is being executed.
806 } else if (dev->type && dev->type->pm) { in device_resume_early()
808 callback = pm_late_early_op(dev->type->pm, state); in device_resume_early()
809 } else if (dev->class && dev->class->pm) { in device_resume_early()
811 callback = pm_late_early_op(dev->class->pm, state); in device_resume_early()
812 } else if (dev->bus && dev->bus->pm) { in device_resume_early()
814 callback = pm_late_early_op(dev->bus->pm, state); in device_resume_early()
822 if (dev->driver && dev->driver->pm) { in device_resume_early()
824 callback = pm_late_early_op(dev->driver->pm, state); in device_resume_early()
856 * @state: PM transition of the system being carried out.
904 * @state: PM transition of the system being carried out.
916 * @state: PM transition of the system being carried out.
959 if (dev->type && dev->type->pm) { in device_resume()
961 callback = pm_op(dev->type->pm, state); in device_resume()
965 if (dev->class && dev->class->pm) { in device_resume()
967 callback = pm_op(dev->class->pm, state); in device_resume()
972 if (dev->bus->pm) { in device_resume()
974 callback = pm_op(dev->bus->pm, state); in device_resume()
983 if (!callback && dev->driver && dev->driver->pm) { in device_resume()
985 callback = pm_op(dev->driver->pm, state); in device_resume()
1017 * @state: PM transition of the system being carried out.
1070 * device_complete - Complete a PM transition for given device.
1072 * @state: PM transition of the system being carried out.
1087 } else if (dev->type && dev->type->pm) { in device_complete()
1089 callback = dev->type->pm->complete; in device_complete()
1090 } else if (dev->class && dev->class->pm) { in device_complete()
1092 callback = dev->class->pm->complete; in device_complete()
1093 } else if (dev->bus && dev->bus->pm) { in device_complete()
1095 callback = dev->bus->pm->complete; in device_complete()
1098 if (!callback && dev->driver && dev->driver->pm) { in device_complete()
1100 callback = dev->driver->pm->complete; in device_complete()
1115 * dpm_complete - Complete a PM transition for all non-sysdev devices.
1116 * @state: PM transition of the system being carried out.
1118 * Execute the ->complete() callbacks for all devices whose PM status is not
1157 * @state: PM transition of the system being carried out.
1159 * Execute "resume" callbacks for all devices and complete the PM transition of
1174 * @sleep_state: PM message representing a sleep state.
1176 * Return a PM message representing the resume event corresponding to given
1212 * @state: PM transition of the system being carried out.
1238 } else if (dev->type && dev->type->pm) { in device_suspend_noirq()
1240 callback = pm_noirq_op(dev->type->pm, state); in device_suspend_noirq()
1241 } else if (dev->class && dev->class->pm) { in device_suspend_noirq()
1243 callback = pm_noirq_op(dev->class->pm, state); in device_suspend_noirq()
1244 } else if (dev->bus && dev->bus->pm) { in device_suspend_noirq()
1246 callback = pm_noirq_op(dev->bus->pm, state); in device_suspend_noirq()
1254 if (dev->driver && dev->driver->pm) { in device_suspend_noirq()
1256 callback = pm_noirq_op(dev->driver->pm, state); in device_suspend_noirq()
1275 * runtime PM usage counters and child counters) would be suboptimal. in device_suspend_noirq()
1354 * @state: PM transition of the system being carried out.
1391 * @state: PM transition of the system being carried out.
1394 * Runtime PM is disabled for @dev while this function is being executed.
1423 } else if (dev->type && dev->type->pm) { in device_suspend_late()
1425 callback = pm_late_early_op(dev->type->pm, state); in device_suspend_late()
1426 } else if (dev->class && dev->class->pm) { in device_suspend_late()
1428 callback = pm_late_early_op(dev->class->pm, state); in device_suspend_late()
1429 } else if (dev->bus && dev->bus->pm) { in device_suspend_late()
1431 callback = pm_late_early_op(dev->bus->pm, state); in device_suspend_late()
1439 if (dev->driver && dev->driver->pm) { in device_suspend_late()
1441 callback = pm_late_early_op(dev->driver->pm, state); in device_suspend_late()
1473 * @state: PM transition of the system being carried out.
1528 * @state: PM transition of the system being carried out.
1552 * @state: PM transition of the system being carried out.
1600 * @state: PM transition of the system being carried out.
1621 * Wait for possible runtime PM transitions of the device in progress in device_suspend()
1627 * of the device, they must disable runtime PM for it or otherwise in device_suspend()
1672 if (dev->type && dev->type->pm) { in device_suspend()
1674 callback = pm_op(dev->type->pm, state); in device_suspend()
1678 if (dev->class && dev->class->pm) { in device_suspend()
1680 callback = pm_op(dev->class->pm, state); in device_suspend()
1685 if (dev->bus->pm) { in device_suspend()
1687 callback = pm_op(dev->bus->pm, state); in device_suspend()
1697 if (!callback && dev->driver && dev->driver->pm) { in device_suspend()
1699 callback = pm_op(dev->driver->pm, state); in device_suspend()
1739 * @state: PM transition of the system being carried out.
1796 * @state: PM transition of the system being carried out.
1826 else if (dev->type && dev->type->pm) in device_prepare()
1827 callback = dev->type->pm->prepare; in device_prepare()
1828 else if (dev->class && dev->class->pm) in device_prepare()
1829 callback = dev->class->pm->prepare; in device_prepare()
1830 else if (dev->bus && dev->bus->pm) in device_prepare()
1831 callback = dev->bus->pm->prepare; in device_prepare()
1833 if (!callback && dev->driver && dev->driver->pm) in device_prepare()
1834 callback = dev->driver->pm->prepare; in device_prepare()
1863 * dpm_prepare - Prepare all non-sysdev devices for a system PM transition.
1864 * @state: PM transition of the system being carried out.
1926 * dpm_suspend_start - Prepare devices for PM transition and suspend them.
1927 * @state: PM transition of the system being carried out.
1929 * Prepare all non-sysdev devices for system PM transition and execute "suspend"
2010 (!dev->bus || (pm_ops_is_empty(dev->bus->pm) && in device_pm_check_callbacks()
2012 (!dev->class || pm_ops_is_empty(dev->class->pm)) && in device_pm_check_callbacks()
2013 (!dev->type || pm_ops_is_empty(dev->type->pm)) && in device_pm_check_callbacks()
2015 (!dev->driver || (pm_ops_is_empty(dev->driver->pm) && in device_pm_check_callbacks()