DEVICE_SUSPEND(9)

NAME
device_suspend - Save state and stop all devices in system.

SYNOPSIS

int device_suspend (pm_message_t state);

ARGUMENTS

state
    Power state to put each device in.

DESCRIPTION

Walk the dpm_active list, call ->suspend for each device, and move it to dpm_off. Check the return value for each. If it returns 0, then we move the the device to the dpm_off list. If it returns -EAGAIN, we move it to the dpm_off_irq list. If we get a different error, try and back out.

If we hit a failure with any of the devices, call device_resume above to bring the suspended devices back to life.