device_suspend
Prev | Device Drivers Power Management | Next

## 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 the dpm_off list.

(For historical reasons, if it returns -EAGAIN, that used to mean that the device would be called again with interrupts disabled. These days, we use the “`suspend_late`” callback for that, so we print a warning and consider it an error).

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.

Prev | Up | Next
device_power_up | Home | device_power_down