Lines Matching full:runtime

2 Runtime Power Management Framework for I/O Devices
14 Support for runtime power management (runtime PM) of I/O devices is provided
19 used for queuing all work items related to runtime PM, because this allows
24 * A number of runtime PM fields in the 'power' member of 'struct device' (which
26 be used for synchronizing runtime PM operations with one another.
28 * Three device runtime PM callbacks in 'struct dev_pm_ops' (defined in
31 * A set of helper functions defined in drivers/base/power/runtime.c that can be
32 used for carrying out runtime PM operations in such a way that the
36 The runtime PM callbacks present in 'struct dev_pm_ops', the device runtime PM
38 runtime PM are described below.
40 2. Device Runtime PM Callbacks
43 There are three device runtime PM callbacks defined in 'struct dev_pm_ops'::
98 RAM until the appropriate resume callback is executed for it. The runtime
102 * If the suspend callback returns -EBUSY or -EAGAIN, the device's runtime PM
131 I/O operations as needed. The runtime PM status of the device is then
155 0, then the PM core will attempt to carry out a runtime suspend of the device,
164 that the following constraints are met with respect to runtime PM callbacks for
176 ->runtime_suspend() for the devices the runtime PM status of which is
185 PM core will only execute ->runtime_resume() for the devices the runtime
205 3. Runtime PM Device Fields
208 The following device runtime PM fields are present in 'struct dev_pm_info', as
240 equal to zero); the initial value of it is 1 (i.e. runtime PM is
264 - the runtime PM status of the device; this field's initial value is
269 - the last runtime PM status of the device captured before disabling runtime
279 - indicates that the device does not use the runtime PM callbacks (see
306 4. Runtime PM Device Helper Functions
309 The following runtime PM helper functions are defined in
310 drivers/base/power/runtime.c and include/linux/pm_runtime.h:
313 - initialize the device runtime PM fields in 'struct dev_pm_info'
316 - make sure that the runtime PM of the device will be disabled after
327 success, 1 if the device's runtime PM status was already 'suspended', or
340 success, 1 if the device's runtime PM status is already 'active' (also if
351 runtime PM status was already 'active') or the error code from
369 runtime status was already 'suspended', or error code if the request
377 success, 1 if the device's runtime PM status was already 'active', or
397 runtime PM status is RPM_ACTIVE and the runtime PM usage counter is
403 runtime PM status is RPM_ACTIVE, increment the counter and
435 to zero, the runtime PM helper functions can execute subsystem-level
440 field was previously zero, this prevents subsystem-level runtime PM
442 pending runtime PM operations on the device are either completed or
449 (synchronously) in that case, cancel any other pending runtime PM requests
450 regarding it and wait for all runtime PM operations on it in progress to
459 - clear the device's 'power.runtime_error' flag, set the device's runtime
467 - clear the device's 'power.runtime_error' flag, set the device's runtime
474 - return true if the device's runtime PM status is 'active' or its
478 - return true if the device's runtime PM status is 'suspended' and its
482 - return true if the device's runtime PM status is 'suspended'
495 - set the power.no_callbacks flag for the device and remove the runtime
500 - set the power.irq_safe flag for the device, causing the runtime-PM
505 the runtime-PM callbacks to be invoked with interrupts off
522 milliseconds); if 'delay' is negative then runtime suspends are
569 5. Runtime PM Initialization, Device Probing and Removal
572 Initially, the runtime PM is disabled for all devices, which means that the
573 majority of the runtime PM helper functions described in Section 4 will return
576 In addition to that, the initial runtime PM status of all devices is
579 runtime PM status must be changed to 'active', with the help of
582 However, if the device has a parent and the parent's runtime PM is enabled,
587 runtime PM is still disabled (i.e. pm_runtime_enable() hasn't been called for
590 should be called for it too as soon as reasonably possible or its runtime PM
594 If the default initial runtime PM status of the device (i.e. 'suspended')
598 should be used. Of course, for this purpose the device's runtime PM has to be
610 time. A driver that makes use of the runtime autosuspend feature may want to
613 Moreover, the driver core prevents runtime PM callbacks from racing with the bus
616 runtime PM functionality. It does so by calling pm_runtime_get_sync() before
625 drivers to make their ->remove() callbacks avoid races with runtime PM directly,
629 Drivers in ->remove() callback should undo the runtime PM changes done
637 runtime power management of the device until the user space turns it on.
638 Namely, during the initialization the driver can make sure that the runtime PM
645 6. Runtime PM and System Sleep
648 Runtime PM and system sleep (i.e., system suspend and hibernation, also known
653 The device may have different wake-up settings for runtime PM and system sleep.
654 For example, remote wake-up may be enabled for runtime suspend but disallowed
660 or other settings for runtime suspend and system sleep.
679 likely it would need a runtime resume in the near future anyway.
682 brought back to full power during resume, then its runtime PM status will have
690 The PM core always increments the runtime usage counter before calling the
692 Hence disabling runtime PM temporarily like this will not cause any runtime
712 that the device appears to be runtime-suspended and its state is fine, so it
713 may be left in runtime suspend provided that all of its descendants are also
714 left in runtime suspend. If that happens, the PM core will not execute any
722 the runtime PM and system suspend/resume (and hibernation) callbacks by carrying
765 if successful, change the device's runtime PM status to 'active'
802 if successful, change the device's runtime PM status to 'active'
815 poweroff and runtime suspend callback, and similarly for system resume, thaw,
816 restore, and runtime resume, can achieve similar behaviour with the help of the
827 need of runtime PM callbacks; if the callbacks did exist, ->runtime_suspend()
835 prevent the non-debugging runtime PM sysfs attributes from being created.
843 or driver about runtime power changes. Instead, the driver for the device's
849 the runtime PM callbacks needs to be implemented, a platform dependent PM
852 in subsystems/drivers, the PM core allows runtime PM callbacks to be
864 at runtime until they have been inactive for some minimum period. Even when
870 the appropriate PM routines); rather it means that runtime suspends will