static int ehci_omap_bus_suspend(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; struct ehci_hcd_omap_platform_data *pdata; struct omap_hwmod *oh; struct clk *clk; int ret = 0; int i; dev_dbg(dev, "ehci_omap_bus_suspend\n"); ret = ehci_bus_suspend(hcd); if (ret != 0) { dev_dbg(dev, "ehci_omap_bus_suspend failed %d\n", ret); return ret; } oh = omap_hwmod_lookup(USBHS_EHCI_HWMODNAME); omap_hwmod_enable_ioring_wakeup(oh); if (dev->parent) pm_runtime_put_sync(dev->parent); /* At the end, disable any external transceiver clocks */ pdata = dev->platform_data; for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { clk = pdata->transceiver_clk[i]; if (clk) clk_disable(clk); } return ret; }
static int ohci_omap3_bus_suspend(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; struct omap_hwmod *oh; int ret = 0; dev_dbg(dev, "ohci_omap3_bus_suspend\n"); ret = ohci_bus_suspend(hcd); /* Delay required so that after ohci suspend * smart stand by can be set in the driver. * required for power mangament */ msleep(5); if (ret != 0) { dev_dbg(dev, "ohci_omap3_bus_suspend failed %d\n", ret); return ret; } oh = omap_hwmod_lookup(USBHS_OHCI_HWMODNAME); omap_hwmod_enable_ioring_wakeup(oh); if (dev->parent) pm_runtime_put_sync(dev->parent); return ret; }
static int ohci_omap3_bus_suspend(struct usb_hcd *hcd) { struct device *dev = hcd->self.controller; struct ohci_hcd_omap_platform_data *pdata; #ifndef CONFIG_USB_OOBWAKE struct omap_hwmod *oh; #endif int ret = 0; dev_dbg(dev, "ohci_omap3_bus_suspend\n"); ret = ohci_bus_suspend(hcd); /* Delay required so that after ohci suspend * smart stand by can be set in the driver. * required for power mangament */ msleep(5); if (ret != 0) { dev_dbg(dev, "ohci_omap3_bus_suspend failed %d\n", ret); return ret; } disable_irq(hcd->irq); clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); #ifndef CONFIG_USB_OOBWAKE oh = omap_hwmod_lookup(USBHS_OHCI_HWMODNAME); if (oh) omap_hwmod_enable_ioring_wakeup(oh); #endif if (dev->parent) pm_runtime_put_sync(dev->parent); /* Disable Any External Transceiver */ pdata = dev->platform_data; if (pdata->ohci_phy_suspend) pdata->ohci_phy_suspend(1); return ret; }