Thread (10 messages) 10 messages, 2 authors, 2014-02-20

Re: how to know how long it takes on suspend/resume for platform usb driver

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2014-02-20 17:08:18

On Fri, 21 Feb 2014, loody wrote:
quoted
quoted
after tracing the kernel src, I found the usb resume call back is
called in drivers/base/power/main.c -> dpm_resume.

is that the only way usb resume functions could be called?
Yes.
I found all usb devices will be register as dev->power.async_suspend
=1 in usb_new_device.

if all usb devices' resume will be finished in
drivers/base/power/main.c -> dpm_resume, what is the difference to
register these devices as async_suspend =1?
Doesn't async_schedule in dpm_resume will let those async_suspend =1
devices resume after calling dpm_resume?
Sorry, I should have been more careful in my reply.

The resume routines are always called from device_resume.  If
async_suspend is set to 0 then dpm_resume calls device_resume directly.  
If async_suspend is set to 1 then dpm_resume starts up an async thread,
which calls device_resume indirectly (by way of async_resume).

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help