void usb_lpm_exit_w(struct work_struct *work) { struct msmusb_hcd *mhcd = container_of((void *) work, struct msmusb_hcd, lpm_exit_work); struct usb_hcd *hcd = mhcd_to_hcd(mhcd); struct device *dev = container_of((void *)hcd, struct device, driver_data); msm_xusb_enable_clks(mhcd); if (usb_wakeup_phy(hcd)) { pr_err("fatal error: cannot bring phy out of lpm\n"); return; } /* If resume signalling finishes before lpm exit, PCD is not set in * USBSTS register. Drive resume signal to the downstream device now * so that EHCI can process the upcoming port change interrupt.*/ writel(readl(USB_PORTSC) | PORTSC_FPR, USB_PORTSC); if (mhcd->xceiv && mhcd->xceiv->set_suspend) mhcd->xceiv->set_suspend(0); if (device_may_wakeup(dev)) disable_irq_wake(hcd->irq); enable_irq(hcd->irq); }
void usb_lpm_exit_w(struct work_struct *work) { struct msmusb_hcd *mhcd = container_of((void *) work, struct msmusb_hcd, lpm_exit_work); struct usb_hcd *hcd = mhcd_to_hcd(mhcd); struct device *dev = container_of((void *)hcd, struct device, platform_data); msm_xusb_enable_clks(mhcd); if (usb_wakeup_phy(hcd)) { pr_err("fatal error: cannot bring phy out of lpm\n"); return; } writel(readl(USB_PORTSC) | PORTSC_FPR, USB_PORTSC); if (mhcd->xceiv && mhcd->xceiv->set_suspend) mhcd->xceiv->set_suspend(mhcd->xceiv, 0); if (device_may_wakeup(dev)) disable_irq_wake(hcd->irq); enable_irq(hcd->irq); }