[Ksummit-discuss] [TECH TOPIC] PM dependencies

Tomasz Figa tomasz.figa at gmail.com
Mon May 12 21:16:57 UTC 2014


Hi Mark,

On 12.05.2014 22:31, Mark Brown wrote:
> On Mon, May 12, 2014 at 10:27:14PM +0200, Laurent Pinchart wrote:
>> On Monday 12 May 2014 21:14:38 Mark Brown wrote:
> 
>>> This is something ASoC has been resolving since forever with
>>> the machine drivers, Russell King recently created a generic
>>> version of the code that does the dependency deferral glue (see
>>> linux/component.h).  It's not a model of elegance but it ends
>>> up getting the job done.
> 
>> That solves the probe time dependencies, but unfortunately not
>> the runtime PM dependencies.
> 
> It also solves the system suspend dependencies.  Why don't the
> runtime PM dependencies just work with reference counting?
> 

Runtime PM dependencies work with reference counting just fine, but
only for topologies matching Linux driver model, e.g. devices with
exactly one device they depend on, e.g. SPI controller and SPI devices
on the bus driven by it. Add there an IOMMU and other various strange
things that should be transparent to the drivers and it stops working.

I'm still investigating this issue, so more uses cases are yet to be
found, but I also guess this is the purpose of this thread. Anyway,
for some reason .suspend_late() and .resume_early() callbacks exist in
dev_pm_ops struct and I believe that at least some of the cases
"solved" by them might be related to the issue being discussed here.

Best regards,
Tomasz


More information about the Ksummit-discuss mailing list