sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/driver-api/pm/typesmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/driver-api/pm/typesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/driver-api/pm/typesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/driver-api/pm/typesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/driver-api/pm/typesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/driver-api/pm/typesmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types.rsthKubhsection)}(hhh](htitle)}(h"Device Power Management Data Typesh]h"Device Power Management Data Types}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledev_pm_ops (C struct) c.dev_pm_opshNtauh1hhhhhhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhNubhdesc)}(hhh](hdesc_signature)}(h dev_pm_opsh]hdesc_signature_line)}(hstruct dev_pm_opsh](hdesc_sig_keyword)}(hstructh]hstruct}(hhhhhNhNubah}(h]h ]kah"]h$]h&]uh1hhhhhhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1hhhhhhhhKubh desc_name)}(h dev_pm_opsh]h desc_sig_name)}(hhh]h dev_pm_ops}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhhhhhhhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1hsphinx_line_type declaratorhhhhhhhKubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhhhKhhhhubh desc_content)}(hhh]h paragraph)}(hdevice PM callbacks.h]hdevice PM callbacks.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhK?hjChhubah}(h]h ]h"]h$]h&]uh1jAhhhhhhhKubeh}(h]h ](cstructeh"]h$]h&]domainj`objtypejadesctypejanoindex noindexentrynocontentsentryuh1hhhhhhhhNubh container)}(hX.**Definition**:: struct dev_pm_ops { int (*prepare)(struct device *dev); void (*complete)(struct device *dev); int (*suspend)(struct device *dev); int (*resume)(struct device *dev); int (*freeze)(struct device *dev); int (*thaw)(struct device *dev); int (*poweroff)(struct device *dev); int (*restore)(struct device *dev); int (*suspend_late)(struct device *dev); int (*resume_early)(struct device *dev); int (*freeze_late)(struct device *dev); int (*thaw_early)(struct device *dev); int (*poweroff_late)(struct device *dev); int (*restore_early)(struct device *dev); int (*suspend_noirq)(struct device *dev); int (*resume_noirq)(struct device *dev); int (*freeze_noirq)(struct device *dev); int (*thaw_noirq)(struct device *dev); int (*poweroff_noirq)(struct device *dev); int (*restore_noirq)(struct device *dev); int (*runtime_suspend)(struct device *dev); int (*runtime_resume)(struct device *dev); int (*runtime_idle)(struct device *dev); }; **Members** ``prepare`` The principal role of this callback is to prevent new children of the device from being registered after it has returned (the driver's subsystem and generally the rest of the kernel is supposed to prevent new calls to the probe method from being made too once **prepare\(\)** has succeeded). If **prepare\(\)** detects a situation it cannot handle (e.g. registration of a child already in progress), it may return -EAGAIN, so that the PM core can execute it once again (e.g. after a new child has been registered) to recover from the race condition. This method is executed for all kinds of suspend transitions and is followed by one of the suspend callbacks: **suspend\(\)**, **freeze\(\)**, or **poweroff\(\)**. If the transition is a suspend to memory or standby (that is, not related to hibernation), the return value of **prepare\(\)** may be used to indicate to the PM core to leave the device in runtime suspend if applicable. Namely, if **prepare\(\)** returns a positive number, the PM core will understand that as a declaration that the device appears to be runtime-suspended and it may be left in that state during the entire transition and during the subsequent resume if all of its descendants are left in runtime suspend too. If that happens, **complete\(\)** will be executed directly after **prepare\(\)** and it must ensure the proper functioning of the device after the system resume. The PM core executes subsystem-level **prepare\(\)** for all devices before starting to invoke suspend callbacks for any of them, so generally devices may be assumed to be functional or to respond to runtime resume requests while **prepare\(\)** is being executed. However, device drivers may NOT assume anything about the availability of user space at that time and it is NOT valid to request firmware from within **prepare\(\)** (it's too late to do that). It also is NOT valid to allocate substantial amounts of memory from **prepare\(\)** in the GFP_KERNEL mode. [To work around these limitations, drivers may register suspend and hibernation notifiers to be executed before the freezing of tasks.] ``complete`` Undo the changes made by **prepare\(\)**. This method is executed for all kinds of resume transitions, following one of the resume callbacks: **resume\(\)**, **thaw\(\)**, **restore\(\)**. Also called if the state transition fails before the driver's suspend callback: **suspend\(\)**, **freeze\(\)** or **poweroff\(\)**, can be executed (e.g. if the suspend callback fails for one of the other devices that the PM core has unsuccessfully attempted to suspend earlier). The PM core executes subsystem-level **complete\(\)** after it has executed the appropriate resume callbacks for all devices. If the corresponding **prepare\(\)** at the beginning of the suspend transition returned a positive number and the device was left in runtime suspend (without executing any suspend and resume callbacks for it), **complete\(\)** will be the only callback executed for the device during resume. In that case, **complete\(\)** must be prepared to do whatever is necessary to ensure the proper functioning of the device after the system resume. To this end, **complete\(\)** can check the power.direct_complete flag of the device to learn whether (unset) or not (set) the previous suspend and resume callbacks have been executed for it. ``suspend`` Executed before putting the system into a sleep state in which the contents of main memory are preserved. The exact action to perform depends on the device's subsystem (PM domain, device type, class or bus type), but generally the device must be quiescent after subsystem-level **suspend\(\)** has returned, so that it doesn't do any I/O or DMA. Subsystem-level **suspend\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. ``resume`` Executed after waking the system up from a sleep state in which the contents of main memory were preserved. The exact action to perform depends on the device's subsystem, but generally the driver is expected to start working again, responding to hardware events and software requests (the device itself may be left in a low-power state, waiting for a runtime resume to occur). The state of the device at the time its driver's **resume\(\)** callback is run depends on the platform and subsystem the device belongs to. On most platforms, there are no restrictions on availability of resources like clocks during **resume\(\)**. Subsystem-level **resume\(\)** is executed for all devices after invoking subsystem-level **resume_noirq\(\)** for all of them. ``freeze`` Hibernation-specific, executed before creating a hibernation image. Analogous to **suspend\(\)**, but it should not enable the device to signal wakeup events or change its power state. The majority of subsystems (with the notable exception of the PCI bus type) expect the driver-level **freeze\(\)** to save the device settings in memory to be used by **restore\(\)** during the subsequent resume from hibernation. Subsystem-level **freeze\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. ``thaw`` Hibernation-specific, executed after creating a hibernation image OR if the creation of an image has failed. Also executed after a failing attempt to restore the contents of main memory from such an image. Undo the changes made by the preceding **freeze\(\)**, so the device can be operated in the same way as immediately before the call to **freeze\(\)**. Subsystem-level **thaw\(\)** is executed for all devices after invoking subsystem-level **thaw_noirq\(\)** for all of them. It also may be executed directly after **freeze\(\)** in case of a transition error. ``poweroff`` Hibernation-specific, executed after saving a hibernation image. Analogous to **suspend\(\)**, but it need not save the device's settings in memory. Subsystem-level **poweroff\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. ``restore`` Hibernation-specific, executed after restoring the contents of main memory from a hibernation image, analogous to **resume\(\)**. ``suspend_late`` Continue operations started by **suspend\(\)**. For a number of devices **suspend_late\(\)** may point to the same callback routine as the runtime suspend callback. ``resume_early`` Prepare to execute **resume\(\)**. For a number of devices **resume_early\(\)** may point to the same callback routine as the runtime resume callback. ``freeze_late`` Continue operations started by **freeze\(\)**. Analogous to **suspend_late\(\)**, but it should not enable the device to signal wakeup events or change its power state. ``thaw_early`` Prepare to execute **thaw\(\)**. Undo the changes made by the preceding **freeze_late\(\)**. ``poweroff_late`` Continue operations started by **poweroff\(\)**. Analogous to **suspend_late\(\)**, but it need not save the device's settings in memory. ``restore_early`` Prepare to execute **restore\(\)**, analogous to **resume_early\(\)**. ``suspend_noirq`` Complete the actions started by **suspend\(\)**. Carry out any additional operations required for suspending the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **suspend_noirq\(\)** is being executed. It generally is expected that the device will be in a low-power state (appropriate for the target system sleep state) after subsystem-level **suspend_noirq\(\)** has returned successfully. If the device can generate system wakeup signals and is enabled to wake up the system, it should be configured to do so at that time. However, depending on the platform and device's subsystem, **suspend\(\)** or **suspend_late\(\)** may be allowed to put the device into the low-power state and configure it to generate wakeup signals, in which case it generally is not necessary to define **suspend_noirq\(\)**. ``resume_noirq`` Prepare for the execution of **resume\(\)** by carrying out any operations required for resuming the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **resume_noirq\(\)** is being executed. ``freeze_noirq`` Complete the actions started by **freeze\(\)**. Carry out any additional operations required for freezing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **freeze_noirq\(\)** is being executed. The power state of the device should not be changed by either **freeze\(\)**, or **freeze_late\(\)**, or **freeze_noirq\(\)** and it should not be configured to signal system wakeup by any of these callbacks. ``thaw_noirq`` Prepare for the execution of **thaw\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **thaw_noirq\(\)** is being executed. ``poweroff_noirq`` Complete the actions started by **poweroff\(\)**. Analogous to **suspend_noirq\(\)**, but it need not save the device's settings in memory. ``restore_noirq`` Prepare for the execution of **restore\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **restore_noirq\(\)** is being executed. Analogous to **resume_noirq\(\)**. ``runtime_suspend`` Prepare the device for a condition in which it won't be able to communicate with the CPU(s) and RAM due to power management. This need not mean that the device should be put into a low-power state. For example, if the device is behind a link which is about to be turned off, the device may remain at full power. If the device does go to low power and is capable of generating runtime wakeup events, remote wakeup (i.e., a hardware mechanism allowing the device to request a change of its power state via an interrupt) should be enabled for it. ``runtime_resume`` Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. If necessary, put the device into the full-power state and restore its registers, so that it is fully operational. ``runtime_idle`` Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Check these conditions, and return 0 if it's appropriate to let the PM core queue a suspend request for the device.h](jG)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjqubh:}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKChjmubh literal_block)}(hXstruct dev_pm_ops { int (*prepare)(struct device *dev); void (*complete)(struct device *dev); int (*suspend)(struct device *dev); int (*resume)(struct device *dev); int (*freeze)(struct device *dev); int (*thaw)(struct device *dev); int (*poweroff)(struct device *dev); int (*restore)(struct device *dev); int (*suspend_late)(struct device *dev); int (*resume_early)(struct device *dev); int (*freeze_late)(struct device *dev); int (*thaw_early)(struct device *dev); int (*poweroff_late)(struct device *dev); int (*restore_early)(struct device *dev); int (*suspend_noirq)(struct device *dev); int (*resume_noirq)(struct device *dev); int (*freeze_noirq)(struct device *dev); int (*thaw_noirq)(struct device *dev); int (*poweroff_noirq)(struct device *dev); int (*restore_noirq)(struct device *dev); int (*runtime_suspend)(struct device *dev); int (*runtime_resume)(struct device *dev); int (*runtime_idle)(struct device *dev); };h]hXstruct dev_pm_ops { int (*prepare)(struct device *dev); void (*complete)(struct device *dev); int (*suspend)(struct device *dev); int (*resume)(struct device *dev); int (*freeze)(struct device *dev); int (*thaw)(struct device *dev); int (*poweroff)(struct device *dev); int (*restore)(struct device *dev); int (*suspend_late)(struct device *dev); int (*resume_early)(struct device *dev); int (*freeze_late)(struct device *dev); int (*thaw_early)(struct device *dev); int (*poweroff_late)(struct device *dev); int (*restore_early)(struct device *dev); int (*suspend_noirq)(struct device *dev); int (*resume_noirq)(struct device *dev); int (*freeze_noirq)(struct device *dev); int (*thaw_noirq)(struct device *dev); int (*poweroff_noirq)(struct device *dev); int (*restore_noirq)(struct device *dev); int (*runtime_suspend)(struct device *dev); int (*runtime_resume)(struct device *dev); int (*runtime_idle)(struct device *dev); };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKEhjmubjG)}(h **Members**h]jv)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhK_hjmubhdefinition_list)}(hhh](hdefinition_list_item)}(hXL``prepare`` The principal role of this callback is to prevent new children of the device from being registered after it has returned (the driver's subsystem and generally the rest of the kernel is supposed to prevent new calls to the probe method from being made too once **prepare\(\)** has succeeded). If **prepare\(\)** detects a situation it cannot handle (e.g. registration of a child already in progress), it may return -EAGAIN, so that the PM core can execute it once again (e.g. after a new child has been registered) to recover from the race condition. This method is executed for all kinds of suspend transitions and is followed by one of the suspend callbacks: **suspend\(\)**, **freeze\(\)**, or **poweroff\(\)**. If the transition is a suspend to memory or standby (that is, not related to hibernation), the return value of **prepare\(\)** may be used to indicate to the PM core to leave the device in runtime suspend if applicable. Namely, if **prepare\(\)** returns a positive number, the PM core will understand that as a declaration that the device appears to be runtime-suspended and it may be left in that state during the entire transition and during the subsequent resume if all of its descendants are left in runtime suspend too. If that happens, **complete\(\)** will be executed directly after **prepare\(\)** and it must ensure the proper functioning of the device after the system resume. The PM core executes subsystem-level **prepare\(\)** for all devices before starting to invoke suspend callbacks for any of them, so generally devices may be assumed to be functional or to respond to runtime resume requests while **prepare\(\)** is being executed. However, device drivers may NOT assume anything about the availability of user space at that time and it is NOT valid to request firmware from within **prepare\(\)** (it's too late to do that). It also is NOT valid to allocate substantial amounts of memory from **prepare\(\)** in the GFP_KERNEL mode. [To work around these limitations, drivers may register suspend and hibernation notifiers to be executed before the freezing of tasks.] h](hterm)}(h ``prepare``h]hliteral)}(hjh]hprepare}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhK_hjubh definition)}(hhh]jG)}(hX?The principal role of this callback is to prevent new children of the device from being registered after it has returned (the driver's subsystem and generally the rest of the kernel is supposed to prevent new calls to the probe method from being made too once **prepare\(\)** has succeeded). If **prepare\(\)** detects a situation it cannot handle (e.g. registration of a child already in progress), it may return -EAGAIN, so that the PM core can execute it once again (e.g. after a new child has been registered) to recover from the race condition. This method is executed for all kinds of suspend transitions and is followed by one of the suspend callbacks: **suspend\(\)**, **freeze\(\)**, or **poweroff\(\)**. If the transition is a suspend to memory or standby (that is, not related to hibernation), the return value of **prepare\(\)** may be used to indicate to the PM core to leave the device in runtime suspend if applicable. Namely, if **prepare\(\)** returns a positive number, the PM core will understand that as a declaration that the device appears to be runtime-suspended and it may be left in that state during the entire transition and during the subsequent resume if all of its descendants are left in runtime suspend too. If that happens, **complete\(\)** will be executed directly after **prepare\(\)** and it must ensure the proper functioning of the device after the system resume. The PM core executes subsystem-level **prepare\(\)** for all devices before starting to invoke suspend callbacks for any of them, so generally devices may be assumed to be functional or to respond to runtime resume requests while **prepare\(\)** is being executed. However, device drivers may NOT assume anything about the availability of user space at that time and it is NOT valid to request firmware from within **prepare\(\)** (it's too late to do that). It also is NOT valid to allocate substantial amounts of memory from **prepare\(\)** in the GFP_KERNEL mode. [To work around these limitations, drivers may register suspend and hibernation notifiers to be executed before the freezing of tasks.]h](hXThe principal role of this callback is to prevent new children of the device from being registered after it has returned (the driver’s subsystem and generally the rest of the kernel is supposed to prevent new calls to the probe method from being made too once }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh has succeeded). If }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhX^ detects a situation it cannot handle (e.g. registration of a child already in progress), it may return -EAGAIN, so that the PM core can execute it once again (e.g. after a new child has been registered) to recover from the race condition. This method is executed for all kinds of suspend transitions and is followed by one of the suspend callbacks: }(hjhhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh, }(hjhhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh, or }(hjhhhNhNubjv)}(h**poweroff\(\)**h]h poweroff()}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhr. If the transition is a suspend to memory or standby (that is, not related to hibernation), the return value of }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhj may be used to indicate to the PM core to leave the device in runtime suspend if applicable. Namely, if }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhX* returns a positive number, the PM core will understand that as a declaration that the device appears to be runtime-suspended and it may be left in that state during the entire transition and during the subsequent resume if all of its descendants are left in runtime suspend too. If that happens, }(hjhhhNhNubjv)}(h**complete\(\)**h]h complete()}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh! will be executed directly after }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhw and it must ensure the proper functioning of the device after the system resume. The PM core executes subsystem-level }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh for all devices before starting to invoke suspend callbacks for any of them, so generally devices may be assumed to be functional or to respond to runtime resume requests while }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh is being executed. However, device drivers may NOT assume anything about the availability of user space at that time and it is NOT valid to request firmware from within }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhd (it’s too late to do that). It also is NOT valid to allocate substantial amounts of memory from }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh in the GFP_KERNEL mode. [To work around these limitations, drivers may register suspend and hibernation notifiers to be executed before the freezing of tasks.]}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKBhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK_hjubj)}(hX``complete`` Undo the changes made by **prepare\(\)**. This method is executed for all kinds of resume transitions, following one of the resume callbacks: **resume\(\)**, **thaw\(\)**, **restore\(\)**. Also called if the state transition fails before the driver's suspend callback: **suspend\(\)**, **freeze\(\)** or **poweroff\(\)**, can be executed (e.g. if the suspend callback fails for one of the other devices that the PM core has unsuccessfully attempted to suspend earlier). The PM core executes subsystem-level **complete\(\)** after it has executed the appropriate resume callbacks for all devices. If the corresponding **prepare\(\)** at the beginning of the suspend transition returned a positive number and the device was left in runtime suspend (without executing any suspend and resume callbacks for it), **complete\(\)** will be the only callback executed for the device during resume. In that case, **complete\(\)** must be prepared to do whatever is necessary to ensure the proper functioning of the device after the system resume. To this end, **complete\(\)** can check the power.direct_complete flag of the device to learn whether (unset) or not (set) the previous suspend and resume callbacks have been executed for it. h](j)}(h ``complete``h]j)}(hjh]hcomplete}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKrhjubj)}(hhh]jG)}(hXUndo the changes made by **prepare\(\)**. This method is executed for all kinds of resume transitions, following one of the resume callbacks: **resume\(\)**, **thaw\(\)**, **restore\(\)**. Also called if the state transition fails before the driver's suspend callback: **suspend\(\)**, **freeze\(\)** or **poweroff\(\)**, can be executed (e.g. if the suspend callback fails for one of the other devices that the PM core has unsuccessfully attempted to suspend earlier). The PM core executes subsystem-level **complete\(\)** after it has executed the appropriate resume callbacks for all devices. If the corresponding **prepare\(\)** at the beginning of the suspend transition returned a positive number and the device was left in runtime suspend (without executing any suspend and resume callbacks for it), **complete\(\)** will be the only callback executed for the device during resume. In that case, **complete\(\)** must be prepared to do whatever is necessary to ensure the proper functioning of the device after the system resume. To this end, **complete\(\)** can check the power.direct_complete flag of the device to learn whether (unset) or not (set) the previous suspend and resume callbacks have been executed for it.h](hUndo the changes made by }(hj hhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubhg. This method is executed for all kinds of resume transitions, following one of the resume callbacks: }(hj hhhNhNubjv)}(h**resume\(\)**h]h resume()}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }(hj hhhNhNubjv)}(h **thaw\(\)**h]hthaw()}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }hj sbjv)}(h**restore\(\)**h]h restore()}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubhU. Also called if the state transition fails before the driver’s suspend callback: }(hj hhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }hj sbjv)}(h**freeze\(\)**h]h freeze()}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh or }(hj hhhNhNubjv)}(h**poweroff\(\)**h]h poweroff()}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, can be executed (e.g. if the suspend callback fails for one of the other devices that the PM core has unsuccessfully attempted to suspend earlier). The PM core executes subsystem-level }(hj hhhNhNubjv)}(h**complete\(\)**h]h complete()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh_ after it has executed the appropriate resume callbacks for all devices. If the corresponding }(hj hhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh at the beginning of the suspend transition returned a positive number and the device was left in runtime suspend (without executing any suspend and resume callbacks for it), }(hj hhhNhNubjv)}(h**complete\(\)**h]h complete()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubhQ will be the only callback executed for the device during resume. In that case, }(hj hhhNhNubjv)}(h**complete\(\)**h]h complete()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh must be prepared to do whatever is necessary to ensure the proper functioning of the device after the system resume. To this end, }(hj hhhNhNubjv)}(h**complete\(\)**h]h complete()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh can check the power.direct_complete flag of the device to learn whether (unset) or not (set) the previous suspend and resume callbacks have been executed for it.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKahjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKrhjubj)}(hX``suspend`` Executed before putting the system into a sleep state in which the contents of main memory are preserved. The exact action to perform depends on the device's subsystem (PM domain, device type, class or bus type), but generally the device must be quiescent after subsystem-level **suspend\(\)** has returned, so that it doesn't do any I/O or DMA. Subsystem-level **suspend\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. h](j)}(h ``suspend``h]j)}(hjh]hsuspend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKzhjubj)}(hhh]jG)}(hXExecuted before putting the system into a sleep state in which the contents of main memory are preserved. The exact action to perform depends on the device's subsystem (PM domain, device type, class or bus type), but generally the device must be quiescent after subsystem-level **suspend\(\)** has returned, so that it doesn't do any I/O or DMA. Subsystem-level **suspend\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them.h](hXExecuted before putting the system into a sleep state in which the contents of main memory are preserved. The exact action to perform depends on the device’s subsystem (PM domain, device type, class or bus type), but generally the device must be quiescent after subsystem-level }(hjhhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhG has returned, so that it doesn’t do any I/O or DMA. Subsystem-level }(hjhhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh< is executed for all devices after invoking subsystem-level }(hjhhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh for all of them.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKzhjubj)}(hX``resume`` Executed after waking the system up from a sleep state in which the contents of main memory were preserved. The exact action to perform depends on the device's subsystem, but generally the driver is expected to start working again, responding to hardware events and software requests (the device itself may be left in a low-power state, waiting for a runtime resume to occur). The state of the device at the time its driver's **resume\(\)** callback is run depends on the platform and subsystem the device belongs to. On most platforms, there are no restrictions on availability of resources like clocks during **resume\(\)**. Subsystem-level **resume\(\)** is executed for all devices after invoking subsystem-level **resume_noirq\(\)** for all of them. h](j)}(h ``resume``h]j)}(hjrh]hresume}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjlubj)}(hhh]jG)}(hXExecuted after waking the system up from a sleep state in which the contents of main memory were preserved. The exact action to perform depends on the device's subsystem, but generally the driver is expected to start working again, responding to hardware events and software requests (the device itself may be left in a low-power state, waiting for a runtime resume to occur). The state of the device at the time its driver's **resume\(\)** callback is run depends on the platform and subsystem the device belongs to. On most platforms, there are no restrictions on availability of resources like clocks during **resume\(\)**. Subsystem-level **resume\(\)** is executed for all devices after invoking subsystem-level **resume_noirq\(\)** for all of them.h](hXExecuted after waking the system up from a sleep state in which the contents of main memory were preserved. The exact action to perform depends on the device’s subsystem, but generally the driver is expected to start working again, responding to hardware events and software requests (the device itself may be left in a low-power state, waiting for a runtime resume to occur). The state of the device at the time its driver’s }(hjhhhNhNubjv)}(h**resume\(\)**h]h resume()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh callback is run depends on the platform and subsystem the device belongs to. On most platforms, there are no restrictions on availability of resources like clocks during }(hjhhhNhNubjv)}(h**resume\(\)**h]h resume()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh. Subsystem-level }(hjhhhNhNubjv)}(h**resume\(\)**h]h resume()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh< is executed for all devices after invoking subsystem-level }(hjhhhNhNubjv)}(h**resume_noirq\(\)**h]hresume_noirq()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh for all of them.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hX&``freeze`` Hibernation-specific, executed before creating a hibernation image. Analogous to **suspend\(\)**, but it should not enable the device to signal wakeup events or change its power state. The majority of subsystems (with the notable exception of the PCI bus type) expect the driver-level **freeze\(\)** to save the device settings in memory to be used by **restore\(\)** during the subsequent resume from hibernation. Subsystem-level **freeze\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. h](j)}(h ``freeze``h]j)}(hjh]hfreeze}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hXHibernation-specific, executed before creating a hibernation image. Analogous to **suspend\(\)**, but it should not enable the device to signal wakeup events or change its power state. The majority of subsystems (with the notable exception of the PCI bus type) expect the driver-level **freeze\(\)** to save the device settings in memory to be used by **restore\(\)** during the subsequent resume from hibernation. Subsystem-level **freeze\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them.h](hQHibernation-specific, executed before creating a hibernation image. Analogous to }(hj hhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, but it should not enable the device to signal wakeup events or change its power state. The majority of subsystems (with the notable exception of the PCI bus type) expect the driver-level }(hj hhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh5 to save the device settings in memory to be used by }(hj hhhNhNubjv)}(h**restore\(\)**h]h restore()}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh@ during the subsequent resume from hibernation. Subsystem-level }(hj hhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh< is executed for all devices after invoking subsystem-level }(hj hhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh for all of them.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hXA``thaw`` Hibernation-specific, executed after creating a hibernation image OR if the creation of an image has failed. Also executed after a failing attempt to restore the contents of main memory from such an image. Undo the changes made by the preceding **freeze\(\)**, so the device can be operated in the same way as immediately before the call to **freeze\(\)**. Subsystem-level **thaw\(\)** is executed for all devices after invoking subsystem-level **thaw_noirq\(\)** for all of them. It also may be executed directly after **freeze\(\)** in case of a transition error. h](j)}(h``thaw``h]j)}(hjh]hthaw}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hX7Hibernation-specific, executed after creating a hibernation image OR if the creation of an image has failed. Also executed after a failing attempt to restore the contents of main memory from such an image. Undo the changes made by the preceding **freeze\(\)**, so the device can be operated in the same way as immediately before the call to **freeze\(\)**. Subsystem-level **thaw\(\)** is executed for all devices after invoking subsystem-level **thaw_noirq\(\)** for all of them. It also may be executed directly after **freeze\(\)** in case of a transition error.h](hHibernation-specific, executed after creating a hibernation image OR if the creation of an image has failed. Also executed after a failing attempt to restore the contents of main memory from such an image. Undo the changes made by the preceding }(hjhhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhR, so the device can be operated in the same way as immediately before the call to }(hjhhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh. Subsystem-level }(hjhhhNhNubjv)}(h **thaw\(\)**h]hthaw()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh< is executed for all devices after invoking subsystem-level }(hjhhhNhNubjv)}(h**thaw_noirq\(\)**h]hthaw_noirq()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh: for all of them. It also may be executed directly after }(hjhhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh in case of a transition error.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hX``poweroff`` Hibernation-specific, executed after saving a hibernation image. Analogous to **suspend\(\)**, but it need not save the device's settings in memory. Subsystem-level **poweroff\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them. h](j)}(h ``poweroff``h]j)}(hjh]hpoweroff}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hXHibernation-specific, executed after saving a hibernation image. Analogous to **suspend\(\)**, but it need not save the device's settings in memory. Subsystem-level **poweroff\(\)** is executed for all devices after invoking subsystem-level **prepare\(\)** for all of them.h](hNHibernation-specific, executed after saving a hibernation image. Analogous to }(hj5hhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj5ubhJ, but it need not save the device’s settings in memory. Subsystem-level }(hj5hhhNhNubjv)}(h**poweroff\(\)**h]h poweroff()}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj5ubh< is executed for all devices after invoking subsystem-level }(hj5hhhNhNubjv)}(h**prepare\(\)**h]h prepare()}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1juhj5ubh for all of them.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj1hKhjubj)}(h``restore`` Hibernation-specific, executed after restoring the contents of main memory from a hibernation image, analogous to **resume\(\)**. h](j)}(h ``restore``h]j)}(hjh]hrestore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hHibernation-specific, executed after restoring the contents of main memory from a hibernation image, analogous to **resume\(\)**.h](hrHibernation-specific, executed after restoring the contents of main memory from a hibernation image, analogous to }(hjhhhNhNubjv)}(h**resume\(\)**h]h resume()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h``suspend_late`` Continue operations started by **suspend\(\)**. For a number of devices **suspend_late\(\)** may point to the same callback routine as the runtime suspend callback. h](j)}(h``suspend_late``h]j)}(hjh]h suspend_late}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhK~hjubj)}(hhh]jG)}(hContinue operations started by **suspend\(\)**. For a number of devices **suspend_late\(\)** may point to the same callback routine as the runtime suspend callback.h](hContinue operations started by }(hjhhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh. For a number of devices }(hjhhhNhNubjv)}(h**suspend_late\(\)**h]hsuspend_late()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhH may point to the same callback routine as the runtime suspend callback.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK~hjubj)}(h``resume_early`` Prepare to execute **resume\(\)**. For a number of devices **resume_early\(\)** may point to the same callback routine as the runtime resume callback. h](j)}(h``resume_early``h]j)}(hj6h]h resume_early}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj0ubj)}(hhh]jG)}(hPrepare to execute **resume\(\)**. For a number of devices **resume_early\(\)** may point to the same callback routine as the runtime resume callback.h](hPrepare to execute }(hjOhhhNhNubjv)}(h**resume\(\)**h]h resume()}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjOubh. For a number of devices }(hjOhhhNhNubjv)}(h**resume_early\(\)**h]hresume_early()}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1juhjOubhG may point to the same callback routine as the runtime resume callback.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjLubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhjKhKhjubj)}(h``freeze_late`` Continue operations started by **freeze\(\)**. Analogous to **suspend_late\(\)**, but it should not enable the device to signal wakeup events or change its power state. h](j)}(h``freeze_late``h]j)}(hjh]h freeze_late}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hContinue operations started by **freeze\(\)**. Analogous to **suspend_late\(\)**, but it should not enable the device to signal wakeup events or change its power state.h](hContinue operations started by }(hjhhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh. Analogous to }(hjhhhNhNubjv)}(h**suspend_late\(\)**h]hsuspend_late()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubhX, but it should not enable the device to signal wakeup events or change its power state.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hm``thaw_early`` Prepare to execute **thaw\(\)**. Undo the changes made by the preceding **freeze_late\(\)**. h](j)}(h``thaw_early``h]j)}(hjh]h thaw_early}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(h]Prepare to execute **thaw\(\)**. Undo the changes made by the preceding **freeze_late\(\)**.h](hPrepare to execute }(hj hhhNhNubjv)}(h **thaw\(\)**h]hthaw()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh*. Undo the changes made by the preceding }(hj hhhNhNubjv)}(h**freeze_late\(\)**h]hfreeze_late()}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h``poweroff_late`` Continue operations started by **poweroff\(\)**. Analogous to **suspend_late\(\)**, but it need not save the device's settings in memory. h](j)}(h``poweroff_late``h]j)}(hjPh]h poweroff_late}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjJubj)}(hhh]jG)}(hContinue operations started by **poweroff\(\)**. Analogous to **suspend_late\(\)**, but it need not save the device's settings in memory.h](hContinue operations started by }(hjihhhNhNubjv)}(h**poweroff\(\)**h]h poweroff()}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjiubh. Analogous to }(hjihhhNhNubjv)}(h**suspend_late\(\)**h]hsuspend_late()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjiubh9, but it need not save the device’s settings in memory.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjfubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhjehKhjubj)}(hY``restore_early`` Prepare to execute **restore\(\)**, analogous to **resume_early\(\)**. h](j)}(h``restore_early``h]j)}(hjh]h restore_early}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjubj)}(hhh]jG)}(hFPrepare to execute **restore\(\)**, analogous to **resume_early\(\)**.h](hPrepare to execute }(hjhhhNhNubjv)}(h**restore\(\)**h]h restore()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh, analogous to }(hjhhhNhNubjv)}(h**resume_early\(\)**h]hresume_early()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hXo``suspend_noirq`` Complete the actions started by **suspend\(\)**. Carry out any additional operations required for suspending the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **suspend_noirq\(\)** is being executed. It generally is expected that the device will be in a low-power state (appropriate for the target system sleep state) after subsystem-level **suspend_noirq\(\)** has returned successfully. If the device can generate system wakeup signals and is enabled to wake up the system, it should be configured to do so at that time. However, depending on the platform and device's subsystem, **suspend\(\)** or **suspend_late\(\)** may be allowed to put the device into the low-power state and configure it to generate wakeup signals, in which case it generally is not necessary to define **suspend_noirq\(\)**. h](j)}(h``suspend_noirq``h]j)}(hj h]h suspend_noirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hX\Complete the actions started by **suspend\(\)**. Carry out any additional operations required for suspending the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **suspend_noirq\(\)** is being executed. It generally is expected that the device will be in a low-power state (appropriate for the target system sleep state) after subsystem-level **suspend_noirq\(\)** has returned successfully. If the device can generate system wakeup signals and is enabled to wake up the system, it should be configured to do so at that time. However, depending on the platform and device's subsystem, **suspend\(\)** or **suspend_late\(\)** may be allowed to put the device into the low-power state and configure it to generate wakeup signals, in which case it generally is not necessary to define **suspend_noirq\(\)**.h](h Complete the actions started by }(hj$ hhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh. Carry out any additional operations required for suspending the device that might be racing with its driver’s interrupt handler, which is guaranteed not to run while }(hj$ hhhNhNubjv)}(h**suspend_noirq\(\)**h]hsuspend_noirq()}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh is being executed. It generally is expected that the device will be in a low-power state (appropriate for the target system sleep state) after subsystem-level }(hj$ hhhNhNubjv)}(h**suspend_noirq\(\)**h]hsuspend_noirq()}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh has returned successfully. If the device can generate system wakeup signals and is enabled to wake up the system, it should be configured to do so at that time. However, depending on the platform and device’s subsystem, }(hj$ hhhNhNubjv)}(h**suspend\(\)**h]h suspend()}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh or }(hj$ hhhNhNubjv)}(h**suspend_late\(\)**h]hsuspend_late()}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh may be allowed to put the device into the low-power state and configure it to generate wakeup signals, in which case it generally is not necessary to define }(hj$ hhhNhNubjv)}(h**suspend_noirq\(\)**h]hsuspend_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj$ ubh.}(hj$ hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj! ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hX``resume_noirq`` Prepare for the execution of **resume\(\)** by carrying out any operations required for resuming the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **resume_noirq\(\)** is being executed. h](j)}(h``resume_noirq``h]j)}(hj h]h resume_noirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hPrepare for the execution of **resume\(\)** by carrying out any operations required for resuming the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **resume_noirq\(\)** is being executed.h](hPrepare for the execution of }(hj hhhNhNubjv)}(h**resume\(\)**h]h resume()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh by carrying out any operations required for resuming the device that might be racing with its driver’s interrupt handler, which is guaranteed not to run while }(hj hhhNhNubjv)}(h**resume_noirq\(\)**h]hresume_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh is being executed.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hX``freeze_noirq`` Complete the actions started by **freeze\(\)**. Carry out any additional operations required for freezing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **freeze_noirq\(\)** is being executed. The power state of the device should not be changed by either **freeze\(\)**, or **freeze_late\(\)**, or **freeze_noirq\(\)** and it should not be configured to signal system wakeup by any of these callbacks. h](j)}(h``freeze_noirq``h]j)}(hj h]h freeze_noirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hXComplete the actions started by **freeze\(\)**. Carry out any additional operations required for freezing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **freeze_noirq\(\)** is being executed. The power state of the device should not be changed by either **freeze\(\)**, or **freeze_late\(\)**, or **freeze_noirq\(\)** and it should not be configured to signal system wakeup by any of these callbacks.h](h Complete the actions started by }(hj( hhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj( ubh. Carry out any additional operations required for freezing the device that might be racing with its driver’s interrupt handler, which is guaranteed not to run while }(hj( hhhNhNubjv)}(h**freeze_noirq\(\)**h]hfreeze_noirq()}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj( ubhR is being executed. The power state of the device should not be changed by either }(hj( hhhNhNubjv)}(h**freeze\(\)**h]h freeze()}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj( ubh, or }(hj( hhhNhNubjv)}(h**freeze_late\(\)**h]hfreeze_late()}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj( ubh, or }(hj( hhhNhNubjv)}(h**freeze_noirq\(\)**h]hfreeze_noirq()}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj( ubhS and it should not be configured to signal system wakeup by any of these callbacks.}(hj( hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj% ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj$ hKhjubj)}(h``thaw_noirq`` Prepare for the execution of **thaw\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **thaw_noirq\(\)** is being executed. h](j)}(h``thaw_noirq``h]j)}(hj h]h thaw_noirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hPrepare for the execution of **thaw\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **thaw_noirq\(\)** is being executed.h](hPrepare for the execution of }(hj hhhNhNubjv)}(h **thaw\(\)**h]hthaw()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh by carrying out any operations required for thawing the device that might be racing with its driver’s interrupt handler, which is guaranteed not to run while }(hj hhhNhNubjv)}(h**thaw_noirq\(\)**h]hthaw_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh is being executed.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubenh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h``poweroff_noirq`` Complete the actions started by **poweroff\(\)**. Analogous to **suspend_noirq\(\)**, but it need not save the device's settings in memory. h](j)}(h``poweroff_noirq``h]j)}(hj h]hpoweroff_noirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hComplete the actions started by **poweroff\(\)**. Analogous to **suspend_noirq\(\)**, but it need not save the device's settings in memory.h](h Complete the actions started by }(hj hhhNhNubjv)}(h**poweroff\(\)**h]h poweroff()}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh. Analogous to }(hj hhhNhNubjv)}(h**suspend_noirq\(\)**h]hsuspend_noirq()}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh9, but it need not save the device’s settings in memory.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hX*``restore_noirq`` Prepare for the execution of **restore\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **restore_noirq\(\)** is being executed. Analogous to **resume_noirq\(\)**. h](j)}(h``restore_noirq``h]j)}(hj_ h]h restore_noirq}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj] ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjY ubj)}(hhh]jG)}(hXPrepare for the execution of **restore\(\)** by carrying out any operations required for thawing the device that might be racing with its driver's interrupt handler, which is guaranteed not to run while **restore_noirq\(\)** is being executed. Analogous to **resume_noirq\(\)**.h](hPrepare for the execution of }(hjx hhhNhNubjv)}(h**restore\(\)**h]h restore()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjx ubh by carrying out any operations required for thawing the device that might be racing with its driver’s interrupt handler, which is guaranteed not to run while }(hjx hhhNhNubjv)}(h**restore_noirq\(\)**h]hrestore_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjx ubh" is being executed. Analogous to }(hjx hhhNhNubjv)}(h**resume_noirq\(\)**h]hresume_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhjx ubh.}(hjx hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhju ubah}(h]h ]h"]h$]h&]uh1jhjY ubeh}(h]h ]h"]h$]h&]uh1jhjt hKhjubj)}(hX5``runtime_suspend`` Prepare the device for a condition in which it won't be able to communicate with the CPU(s) and RAM due to power management. This need not mean that the device should be put into a low-power state. For example, if the device is behind a link which is about to be turned off, the device may remain at full power. If the device does go to low power and is capable of generating runtime wakeup events, remote wakeup (i.e., a hardware mechanism allowing the device to request a change of its power state via an interrupt) should be enabled for it. h](j)}(h``runtime_suspend``h]j)}(hj h]hruntime_suspend}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hX Prepare the device for a condition in which it won't be able to communicate with the CPU(s) and RAM due to power management. This need not mean that the device should be put into a low-power state. For example, if the device is behind a link which is about to be turned off, the device may remain at full power. If the device does go to low power and is capable of generating runtime wakeup events, remote wakeup (i.e., a hardware mechanism allowing the device to request a change of its power state via an interrupt) should be enabled for it.h]hX"Prepare the device for a condition in which it won’t be able to communicate with the CPU(s) and RAM due to power management. This need not mean that the device should be put into a low-power state. For example, if the device is behind a link which is about to be turned off, the device may remain at full power. If the device does go to low power and is capable of generating runtime wakeup events, remote wakeup (i.e., a hardware mechanism allowing the device to request a change of its power state via an interrupt) should be enabled for it.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hX``runtime_resume`` Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. If necessary, put the device into the full-power state and restore its registers, so that it is fully operational. h](j)}(h``runtime_resume``h]j)}(hj h]hruntime_resume}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubj)}(hhh]jG)}(hPut the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. If necessary, put the device into the full-power state and restore its registers, so that it is fully operational.h]hPut the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. If necessary, put the device into the full-power state and restore its registers, so that it is fully operational.}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h``runtime_idle`` Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Check these conditions, and return 0 if it's appropriate to let the PM core queue a suspend request for the device.h](j)}(h``runtime_idle``h]j)}(hjC h]h runtime_idle}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjA ubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhj= ubj)}(hhh]jG)}(hDevice appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Check these conditions, and return 0 if it's appropriate to let the PM core queue a suspend request for the device.h]hDevice appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Check these conditions, and return 0 if it’s appropriate to let the PM core queue a suspend request for the device.}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhjY ubah}(h]h ]h"]h$]h&]uh1jhj= ubeh}(h]h ]h"]h$]h&]uh1jhjX hKhjubeh}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jkhhhhhhhNubjG)}(h**Description**h]jv)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhhhhubjG)}(hXSeveral device power state transitions are externally visible, affecting the state of pending I/O queues and (for drivers that touch hardware) interrupts, wakeups, DMA, and other hardware state. There may also be internal transitions to various low-power modes which are transparent to the rest of the driver stack (such as a driver that's ON gating off clocks which are not in active use).h]hXSeveral device power state transitions are externally visible, affecting the state of pending I/O queues and (for drivers that touch hardware) interrupts, wakeups, DMA, and other hardware state. There may also be internal transitions to various low-power modes which are transparent to the rest of the driver stack (such as a driver that’s ON gating off clocks which are not in active use).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhhhhubjG)}(hX}The externally visible transitions are handled with the help of callbacks included in this structure in such a way that, typically, two levels of callbacks are involved. First, the PM core executes callbacks provided by PM domains, device types, classes and bus types. They are the subsystem-level callbacks expected to execute callbacks provided by device drivers, although they may choose not to do that. If the driver callbacks are executed, they have to collaborate with the subsystem-level callbacks to achieve the goals appropriate for the given system transition, given transition phase and the subsystem the device belongs to.h]hX}The externally visible transitions are handled with the help of callbacks included in this structure in such a way that, typically, two levels of callbacks are involved. First, the PM core executes callbacks provided by PM domains, device types, classes and bus types. They are the subsystem-level callbacks expected to execute callbacks provided by device drivers, although they may choose not to do that. If the driver callbacks are executed, they have to collaborate with the subsystem-level callbacks to achieve the goals appropriate for the given system transition, given transition phase and the subsystem the device belongs to.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhKhhhhubjG)}(hXAll of the above callbacks, except for **complete\(\)**, return error codes. However, the error codes returned by **resume\(\)**, **thaw\(\)**, **restore\(\)**, **resume_noirq\(\)**, **thaw_noirq\(\)**, and **restore_noirq\(\)**, do not cause the PM core to abort the resume transition during which they are returned. The error codes returned in those cases are only printed to the system logs for debugging purposes. Still, it is recommended that drivers only return error codes from their resume methods in case of an unrecoverable failure (i.e. when the device being handled refuses to resume and becomes unusable) to allow the PM core to be modified in the future, so that it can avoid attempting to handle devices that failed to resume and their children.h](h'All of the above callbacks, except for }(hj hhhNhNubjv)}(h**complete\(\)**h]h complete()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh;, return error codes. However, the error codes returned by }(hj hhhNhNubjv)}(h**resume\(\)**h]h resume()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }(hj hhhNhNubjv)}(h **thaw\(\)**h]hthaw()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }hj sbjv)}(h**restore\(\)**h]h restore()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }(hj hhhNhNubjv)}(h**resume_noirq\(\)**h]hresume_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, }hj sbjv)}(h**thaw_noirq\(\)**h]hthaw_noirq()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubh, and }(hj hhhNhNubjv)}(h**restore_noirq\(\)**h]hrestore_noirq()}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj ubhX, do not cause the PM core to abort the resume transition during which they are returned. The error codes returned in those cases are only printed to the system logs for debugging purposes. Still, it is recommended that drivers only return error codes from their resume methods in case of an unrecoverable failure (i.e. when the device being handled refuses to resume and becomes unusable) to allow the PM core to be modified in the future, so that it can avoid attempting to handle devices that failed to resume and their children.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhhhhubjG)}(hX/It is allowed to unregister devices while the above callbacks are being executed. However, a callback routine MUST NOT try to unregister the device it was called for, although it may unregister children of that device (for example, if it detects that a child was unplugged while the system was asleep).h]hX/It is allowed to unregister devices while the above callbacks are being executed. However, a callback routine MUST NOT try to unregister the device it was called for, although it may unregister children of that device (for example, if it detects that a child was unplugged while the system was asleep).}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhM hhhhubjG)}(hXThere also are callbacks related to runtime power management of devices. Again, as a rule these callbacks are executed by the PM core for subsystems (PM domains, device types, classes and bus types) and the subsystem-level callbacks are expected to invoke the driver callbacks. Moreover, the exact actions to be performed by a device driver's callbacks generally depend on the platform and subsystem the device belongs to.h]hXThere also are callbacks related to runtime power management of devices. Again, as a rule these callbacks are executed by the PM core for subsystems (PM domains, device types, classes and bus types) and the subsystem-level callbacks are expected to invoke the driver callbacks. Moreover, the exact actions to be performed by a device driver’s callbacks generally depend on the platform and subsystem the device belongs to.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhhhhubjG)}(hRefer to Documentation/power/runtime_pm.rst for more information about the role of the **runtime_suspend\(\)**, **runtime_resume\(\)** and **runtime_idle\(\)** callbacks in device runtime power management.h](hWRefer to Documentation/power/runtime_pm.rst for more information about the role of the }(hje hhhNhNubjv)}(h**runtime_suspend\(\)**h]hruntime_suspend()}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1juhje ubh, }(hje hhhNhNubjv)}(h**runtime_resume\(\)**h]hruntime_resume()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhje ubh and }(hje hhhNhNubjv)}(h**runtime_idle\(\)**h]hruntime_idle()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1juhje ubh. callbacks in device runtime power management.}(hje hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h֌dev_pm_domain (C struct)c.dev_pm_domainhNtauh1hhhhhhhhNubh)}(hhh](h)}(h dev_pm_domainh]h)}(hstruct dev_pm_domainh](h)}(hhh]hstruct}(hj hhhNhNubah}(h]h ]hah"]h$]h&]uh1hhj hhhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhM!ubh)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj hhhj hM!ubj)}(h dev_pm_domainh]j)}(hj h]h dev_pm_domain}(hj hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj ubah}(h]h ](j(j)eh"]h$]h&]hhuh1jhj hhhj hM!ubeh}(h]h ]h"]h$]h&]hhj3uh1hj4j5hj hhhj hM!ubah}(h]j ah ](j9j:eh"]h$]h&]j>j?)j@huh1hhj hM!hj hhubjB)}(hhh]jG)}(h'power management domain representation.h]h'power management domain representation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jAhj hhhj hM!ubeh}(h]h ](j`structeh"]h$]h&]jej`jfjjgjjhjijjuh1hhhhhhhhNubjl)}(hXr**Definition**:: struct dev_pm_domain { struct dev_pm_ops ops; int (*start)(struct device *dev); void (*detach)(struct device *dev, bool power_off); int (*activate)(struct device *dev); void (*sync)(struct device *dev); void (*dismiss)(struct device *dev); int (*set_performance_state)(struct device *dev, unsigned int state); }; **Members** ``ops`` Power management operations associated with this domain. ``start`` Called when a user needs to start the device via the domain. ``detach`` Called when removing a device from the domain. ``activate`` Called before executing probe routines for bus types and drivers. ``sync`` Called after successful driver probe. ``dismiss`` Called after unsuccessful driver probe and after driver removal. ``set_performance_state`` Called to request a new performance state.h](jG)}(h**Definition**::h](jv)}(h**Definition**h]h Definition}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1juhj%ubh:}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhj!ubj)}(hXZstruct dev_pm_domain { struct dev_pm_ops ops; int (*start)(struct device *dev); void (*detach)(struct device *dev, bool power_off); int (*activate)(struct device *dev); void (*sync)(struct device *dev); void (*dismiss)(struct device *dev); int (*set_performance_state)(struct device *dev, unsigned int state); };h]hXZstruct dev_pm_domain { struct dev_pm_ops ops; int (*start)(struct device *dev); void (*detach)(struct device *dev, bool power_off); int (*activate)(struct device *dev); void (*sync)(struct device *dev); void (*dismiss)(struct device *dev); int (*set_performance_state)(struct device *dev, unsigned int state); };}hjBsbah}(h]h ]h"]h$]h&]hhuh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhj!ubjG)}(h **Members**h]jv)}(hjSh]hMembers}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1juhjQubah}(h]h ]h"]h$]h&]uh1jFhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhj!ubj)}(hhh](j)}(hA``ops`` Power management operations associated with this domain. h](j)}(h``ops``h]j)}(hjrh]hops}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhjlubj)}(hhh]jG)}(h8Power management operations associated with this domain.h]h8Power management operations associated with this domain.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jFhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjhMhjiubj)}(hG``start`` Called when a user needs to start the device via the domain. h](j)}(h ``start``h]j)}(hjh]hstart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhU/var/lib/git/docbuild/linux/Documentation/driver-api/pm/types:7: ./include/linux/pm.hhMhjubj)}(hhh]jG)}(h