.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "DEVICE_SUSPEND" "" "06 October 2005" "" ""
.SH NAME
device_suspend \- Save state and stop all devices in system.
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int device_suspend (u32 \fIstate\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIstate\fB\fR
Power state to put each device in.
.SH "DESCRIPTION"
.PP
Walk the dpm_active list, call ->\fBsuspend\fR 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.
.PP
If we hit a failure with any of the devices, call \fBdevice_resume\fR
above to bring the suspended devices back to life.
.PP
Note this function leaves dpm_sem held to
a) block other devices from registering.
b) prevent other PM operations from happening after we've begun.
c) make sure we're exclusive when we disable interrupts.