: 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).
|int(*||enter )(suspend_state_t state)|
|int(*||set_target )(suspend_state_t state)|
|int(*||valid )(suspend_state_t state)|