Logo Search packages:      
Sourcecode: linux version File versions

platform_suspend_ops Struct Reference

#include <suspend.h>

List of all members.


Detailed Description

struct platform_suspend_ops - Callbacks for managing platform dependent system sleep states.

: Callback to determine if given system sleep state is supported by the platform. Valid (ie. supported) states are advertised in /sys/power/state. Note that it still may be impossible to enter given system sleep state if the conditions aren't right. There is the suspend_valid_only_mem function available that can be assigned to this if the platform only supports mem sleep.

: Initialise a transition to given system sleep state. () is executed right prior to suspending devices. The information conveyed to the platform code by () should be disregarded by it as soon as () is executed. If () fails (ie. returns nonzero), (), () and () will not be called by the PM core. This callback is optional. However, if it is implemented, the argument passed to () is redundant and should be ignored.

: Prepare the platform for entering the system sleep state indicated by (). () is called right after devices have been suspended (ie. the appropriate .suspend() method has been executed for each device) and before the nonboot CPUs are disabled (it is executed with IRQs enabled). This callback is optional. It returns 0 on success or a negative error code otherwise, in which case the system cannot enter the desired sleep state (() and () will not be called in that case).

: Enter the system sleep state indicated by () or represented by the argument if () is not implemented. This callback is mandatory. It returns 0 on success or a negative error code otherwise, in which case the system cannot enter the desired sleep state.

: Called when the system has just left a sleep state, right after the nonboot CPUs have been enabled and before devices are resumed (it is executed with IRQs enabled). This callback is optional, but should be implemented by the platforms that implement (). If implemented, it is always called after () (even if () fails).

: Called by the PM core right after resuming devices, to indicate to the platform that the system has returned to the working state or the transition to the sleep state has been aborted. This callback is optional, but should be implemented by the platforms that implement (), but platforms implementing () should also provide a () which cleans up transitions aborted before ().

: Recover the platform from a suspend failure. Called by the PM core if the suspending of devices fails. This callback is optional and should only be implemented by platforms which require special recovery actions in that situation.

Definition at line 95 of file suspend.h.


Public Attributes

int(* begin )(suspend_state_t state)
void(* end )(void)
int(* enter )(suspend_state_t state)
void(* finish )(void)
int(* prepare )(void)
void(* recover )(void)
int(* valid )(suspend_state_t state)

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index