Re: [PATCH 4/4] usb: dwc3: second part of hibernation support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 8 Feb 2012, Felipe Balbi wrote:

> Just keep in mind that glue layer also needs to keep track of its own
> usage counters, what I mean by that, is that on dwc3-pci probe you
> should probably call pm_runtime_get_sync() and right before returning
> from probe, you call pm_runtime_put(). This will make sure that the PCIe
> device is powered up when you need and can be autosuspended when you
> don't need it anymore.

Runtime PM for PCI devices uses a slightly different scheme.  The PCI
core increments the usage counter when a PCI device is first probed,
and doesn't decrement the counter until the device is removed.  This 
helps drivers without runtime PM support; the device will never be 
autosuspended.

As a result, if a PCI driver does support autosuspend, it doesn't need
to make any special calls in its probe and remove routines.  It just
has to call pm_runtime_put[_sync] when not using the device and 
pm_runtime_get[_sync] when ready to start using it again.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux