hi alan: 2013/10/2 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > On Wed, 2 Oct 2013, yoma sophian wrote: > >> 1. in susped, we will gate our ehci clk >> in resumt, we need to release clk gating to let ehci control work. >> and above are platform specific behavior need to do >> there seems no such place to do above 2 things. > > You don't do these things in the USB suspend routine; you do them in > the controller suspend routine. For example, take a look at > s5p_ehci_suspend() and s5p_ehci_resume() in ehci-s5p.c. I found what you mentioned. 1. When will platform register dev_pm_ops be called? Is it called before or after usb_device_pm_ops ? 2. in ehci-s5p.c, it create a ".of_match_table". Under what circumstance, the match will happen? That mean how could I make sure the .pm I register in platform_driver will be matched and activated in the feature? > >> 2. in ehci_bus_resume, which handle ehci go back from both suspend/hibernate. >> This function handle ehci basic register default setting, such as >> re-init operational registers and restore CMD_RUN, framelist size, and >> irq threshold Why don't we put "handle basic register default setting, such as re-init operational registers and restore CMD_RUN, framelist size, and irq threshold" as pci_suspend and pci_resume like xhci does? That mean ehci_bus_resume will handle both "usb port resume" and "system hibernate" jobs. But xhci_bus_resume only handle "usb port resume", right? > > Yes. > >> 3. In xhci_bus_resume, I cannot see any behaviour for re-init >> operational registers and restore CMD_RUN, framelist size, and irq >> threshold. for xhci. >> when hibernate happen, the data allocated for device context still >> exist in ddr, but xhci should reinitialise the base address to its >> register. >> If my consumption is correct, why I cannot find this part in xhci_bus_resume. >> so far xhci_bus_resume only take port status. > > Look at xhci_resume() in xhci.c instead. I found it :) Thanks for your great help, -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html