static int ehci_omap_dev_resume(struct device *dev) { struct ehci_hcd_omap *omap = dev_get_drvdata(dev); printk(KERN_DEBUG " omap_dev_resume\n"); if (omap->suspended) ehci_omap_enable(omap, 1); //mdelay(10); //ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG, 0x110d); //mdelay(10); //ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG, 0x21c); if(EP10_HW_ID>=BOARD_ID_DVT1) { gpio_direction_output(109, 1); } gpio_direction_output(21, 1); gpio_direction_output(36, 1); gpio_direction_output(35, 1); modem_PW = 1; mdelay(10); gpio_direction_output(23, 1); PHY_reset = 1; return 0; }
static int ehci_omap_dev_resume(struct device *dev) { struct ehci_hcd_omap *omap = dev_get_drvdata(dev); if (omap->suspended) ehci_omap_enable(omap, 1); return 0; }
static void ehci_hcd_omap_shutdown(struct platform_device *pdev) { struct ehci_hcd_omap *omap = platform_get_drvdata(pdev); struct usb_hcd *hcd = ehci_to_hcd(omap->ehci); if (omap->suspended) ehci_omap_enable(omap, 1); if (hcd->driver->shutdown) hcd->driver->shutdown(hcd); }
/*-------------------------------------------------------------------------*/ static int ehci_omap_dev_suspend(struct device *dev) { struct ehci_hcd_omap *omap = dev_get_drvdata(dev); if (!omap->suspended) ehci_omap_enable(omap, 0); usb3320_hack_set_wakeup(device_may_wakeup(usb3320_hack_dev)); return 0; }
/** * ehci_hcd_omap_remove - shutdown processing for EHCI HCDs * @pdev: USB Host Controller being removed * * Reverses the effect of usb_ehci_hcd_omap_probe(), first invoking * the HCD's stop() method. It is always called from a thread * context, normally "rmmod", "apmd", or something similar. */ static int ehci_hcd_omap_remove(struct platform_device *pdev) { struct ehci_hcd_omap *omap = platform_get_drvdata(pdev); struct usb_hcd *hcd = ehci_to_hcd(omap->ehci); if (omap->suspended) ehci_omap_enable(omap, 1); usb_remove_hcd(hcd); omap_stop_ehc(omap, hcd); iounmap(hcd->regs); //iounmap(omap->tll_base); iounmap(omap->uhh_base); usb_put_hcd(hcd); kfree(omap); return 0; }
/*-------------------------------------------------------------------------*/ static int ehci_omap_dev_suspend(struct device *dev) { struct ehci_hcd_omap *omap = dev_get_drvdata(dev); printk(KERN_DEBUG " omap_dev_suspend\n"); close_Sierra(); if (!omap->suspended) ehci_omap_enable(omap, 0); gpio_direction_output(23, 0); PHY_reset = 0; #ifndef CONFIG_MODEM_SMS gpio_direction_output(4, 0); gpio_direction_output(35, 0); gpio_direction_output(36, 0); #endif return 0; }
/** * ehci_hcd_omap_remove - shutdown processing for EHCI HCDs * @pdev: USB Host Controller being removed * * Reverses the effect of usb_ehci_hcd_omap_probe(), first invoking * the HCD's stop() method. It is always called from a thread * context, normally "rmmod", "apmd", or something similar. */ static int ehci_hcd_omap_remove(struct platform_device *pdev) { struct ehci_hcd_omap *omap = platform_get_drvdata(pdev); struct usb_hcd *hcd = ehci_to_hcd(omap->ehci); int i; if (omap->suspended) ehci_omap_enable(omap, 1); #ifdef CONFIG_LOGIC_OMAP3530_USB3320_HACK usb3320_hack_deinit(); #endif usb_remove_hcd(hcd); omap_stop_ehc(omap, hcd); if (omap->phy_reset) { if (gpio_is_valid(omap->reset_gpio_port[0])) gpio_free(omap->reset_gpio_port[0]); if (gpio_is_valid(omap->reset_gpio_port[1])) gpio_free(omap->reset_gpio_port[1]); } iounmap(hcd->regs); for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { if (omap->regulator[i]) { if (regulator_is_enabled(omap->regulator[i])) regulator_disable(omap->regulator[i]); regulator_put(omap->regulator[i]); } if (omap->regulator_aux[i]) { if (regulator_is_enabled(omap->regulator_aux[i])) regulator_disable(omap->regulator_aux[i]); regulator_put(omap->regulator_aux[i]); } } iounmap(omap->tll_base); iounmap(omap->uhh_base); usb_put_hcd(hcd); kfree(omap); return 0; }