On Fri, May 14, 2010 at 7:01 AM, Gadiyar, Anand <gadiyar@xxxxxx> wrote: > Alan Stern wrote: >> On Thu, 13 May 2010, Anand Gadiyar wrote: >> >> > Add support for suspend and resume to the ehci-omap driver. >> > Added routines for platform_driver suspend/resume and >> > wrappers around ehci_bus_suspend/resume. >> >> > +#ifdef CONFIG_PM >> > >> /*-------------------------------------------------------------------------*/ >> > +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); >> > + Â 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 int ehci_omap_bus_suspend(struct usb_hcd *hcd) >> > +{ >> > + Â struct usb_bus *bus = hcd_to_bus(hcd); >> > + Â int ret; >> > + >> > + Â ret = ehci_bus_suspend(hcd); >> > + >> > + Â ehci_omap_dev_suspend(bus->controller); >> > + >> > + Â return ret; >> > +} >> > +static int ehci_omap_bus_resume(struct usb_hcd *hcd) >> > +{ >> > + Â struct usb_bus *bus = hcd_to_bus(hcd); >> > + Â int ret; >> > + >> > + Â ehci_omap_dev_resume(bus->controller); >> > + >> > + Â ret = ehci_bus_resume(hcd); >> > + >> > + Â return ret; >> > +} >> >> You could use the runtime-PM interface instead of explicitly suspending >> and resuming the controller. ÂIt is now standard. >> > > Will work on this. I'll be out for a while, so it could be some time > before I repost. > > Thanks, > Anand Any more developments on this? -- Laine Walker-Avina -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html