Re: how to know how long it takes on suspend/resume for platform usb driver
From: loody <hidden>
Date: 2014-02-20 16:49:22
hi alan: 2014-02-20 23:53 GMT+08:00 Alan Stern [off-list ref]:
On Thu, 20 Feb 2014, loody wrote:quoted
hi all: 2014-01-06 23:10 GMT+08:00 Alan Stern [off-list ref]:quoted
On Mon, 6 Jan 2014, loody wrote:quoted
quoted
quoted
2. is it possible to change the order of calling resume callback? for example, suppose the original sequence is "ehci -> xhci -> tty ..." and I want to change as "tty-> ehci -> xhci".It is possible only to a very limited extent. You can turn async suspend/resume on or off, and this will affect the order. Of course, when async suspend/resume is off, the total time required will be longer than when it is on. Why do you want to change the order? It shouldn't make any difference.Because I want the GUI and input part of driver resume as earlier as possible. Such that user can keep on their previous work more quicker.I doubt it will make any noticeable difference. Remember, userspace remains frozen until _all_ the devices have been resumed. Until that happens, the user can't do anything.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? Appreciate your kind help,