usb_suspend_device — suspend a usb device
int usb_suspend_device ( | struct usb_device * | udev, |
pm_message_t | state) ; |
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 usb_resume_device
. It's also routine
to disconnect devices while they are suspended.
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.
Returns 0 on success, else negative errno.