Logo Search packages:      
Sourcecode: linux version File versions  Download package

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.

: Tell the platform which system sleep state is going to be entered. () is executed right prior to suspending devices. The information conveyed to the platform code by () should be disregarded by the platform as soon as () is executed and if () fails. 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 meaningless 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).

Definition at line 73 of file suspend.h.


Public Attributes

int(* enter )(suspend_state_t state)
void(* finish )(void)
int(* prepare )(void)
int(* set_target )(suspend_state_t state)
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