lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] usb: Add support for runtime power management of the hcd
On Thu, 13 Aug 2009, Matthew Garrett wrote:

> --- a/drivers/usb/core/hcd-pci.c
> +++ b/drivers/usb/core/hcd-pci.c
> @@ -363,6 +363,18 @@ static int hcd_pci_restore(struct device *dev)
> return resume_common(dev, true);
> }
>
> +static int hcd_pci_runtime_suspend(struct device *dev)
> +{
> + struct pci_dev *pci_dev = to_pci_dev(dev);
> + struct usb_hcd *hcd = pci_get_drvdata(pci_dev);
> + struct usb_device *rhdev = hcd->self.root_hub;
> +
> + if (!(hcd->driver->flags & HCD_RUNTIME_PM))
> + return -EINVAL;
> +
> + return 0;
> +}

You have to call the HCD's pci_suspend method! Not to mention calling
synchronize_irq and all the other stuff in hcd_pci_suspend and
hcd_pci_suspend_noirq.

Ditto for resuming.

Alan Stern



\
 
 \ /
  Last update: 2009-08-13 17:25    [W:0.155 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site