On Mon, 19 Jan 2015, vichy wrote:
> 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?
We are talking about a PCI implementation of EHCI, so dev->type is
pci_bus_type. In drivers/pci/pci-driver.c, pci_bus_type.pm is set to
pci_dev_pm_ops.
The .runtime_suspend member of pci_dev_pm_ops is set to
pci_pm_runtime_suspend. That routine calls
dev->driver->pm->runtime_suspend.
For ehci-pci, dev->driver is ehci_pci_driver.driver and its .pm field
is &usb_hcd_pci_pm_ops. Therefore 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?
That's right. The ehci-platform driver does not support runtime
suspend of the controller. It doesn't support hibernation either.
Alan stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html