.\" 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 "USB_SUSPEND_DEVICE" "9" "09 October 2005" "" "" .SH NAME usb_suspend_device \- suspend a usb device .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int usb_suspend_device (struct usb_device * \fIudev\fB, pm_message_t \fIstate\fB); \fR .SH "ARGUMENTS" .TP \fB\fIudev\fB\fR device that's no longer in active use .TP \fB\fIstate\fB\fR PMSG_SUSPEND to suspend .SH "CONTEXT" .PP must be able to sleep; device not locked .SH "DESCRIPTION" .PP Suspends a USB device that isn't in active use, conserving power. Devices may wake out of a suspend, if anything important happens, using the remote wakeup mechanism. They may also be taken out of suspend by the host, using \fBusb_resume_device\fR\&. It's also routine to disconnect devices while they are suspended. .PP Suspending OTG devices may trigger HNP, if that's been enabled between a pair of dual-role devices. That will change roles, such as from A-Host to A-Peripheral or from B-Host back to B-Peripheral. .PP Returns 0 on success, else negative errno.