hi Alan:

2015-01-19 0:49 GMT+08:00 Alan Stern <st...@rowland.harvard.edu>:
> 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().
I have several questions:
a.
in ehci-pci driver, the runtime suspend is register in the driver
structure, driver->pm, like below.
static struct pci_driver ehci_pci_driver = {
    ...................
    .probe =    usb_hcd_pci_probe,
    .remove =    usb_hcd_pci_remove,
    .shutdown =     usb_hcd_pci_shutdown,

#ifdef CONFIG_PM_SLEEP
    .driver =    {
        .pm =    &usb_hcd_pci_pm_ops
    },
#endif
};

But rpm_suspend search runtime suspend from device structure.
like dev->pm_domain, dev->type, dev->class, dev->bus, etc.

Why hcd_pci_runtime_suspend will be called?

b.
Contrary to pci system, in ehci-platfomr.c, there is no any runtime
suspend call back register in ehci_platform_pm_ops.
Could we get the conclusion that ehci controller will NOT be suspended
when all device on the root hub and root hub are suspended?

Sincerely appreciate your kind help,
--
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