On Sun, 18 Jan 2015, vichy wrote:

> after tracing the source, I only can find the ehci_suspend is called
> when system hibernate/suspend.
> rpm_suspend use below method to find out suspend callback
>     if (dev->pm_domain)
>         callback = dev->pm_domain->ops.runtime_suspend;
>     else if (dev->type && dev->type->pm)
>         callback = dev->type->pm->runtime_suspend;
>     else if (dev->class && dev->class->pm)
>         callback = dev->class->pm->runtime_suspend;
>     else if (dev->bus && dev->bus->pm)
>         callback = dev->bus->pm->runtime_suspend;
>     else
>         callback = NULL;
> 
> ehci_suspend doesn't register any one of above function.

ehci_pci_init() in ehci_pci.c stores ehci_suspend in
ehci_pci_hc_driver.pci_suspend.  That pointer is called by
suspend_common() in hcd-pci.c, which is called by both
hcd_pci_suspend() and hcd_pci_runtime_suspend().

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to