[alsa-devel] [PATCH 3/3] ASoC: davinci-mcasp: Optimize pm_runtime usage and clean up the init code

Peter Ujfalusi peter.ujfalusi at ti.com
Tue Apr 22 14:20:33 CEST 2014


On 04/22/2014 02:47 PM, Mark Brown wrote:
> On Tue, Apr 22, 2014 at 02:03:14PM +0300, Peter Ujfalusi wrote:
>> Move the pm_runtime_enable/disable to dai driver probe/remove callbacks from
>> module probe/remove callbacks.
>> With this change we can remove the platform driver's remove function since
>> it became NULL.
> 
> This does mean that if the device gets enumerated but isn't used in the
> system it won't go to runtime idle since the DAI level probe is only
> called when we're building a card.

If the given mcasp is not used as part of a card, it should not have been
probed in the first place (at least with DT boot we can control this). If the
driver is probed for a mcasp instance and it is not part of any card than it
can be left disabled IMHO no need for runtime pm to take care of it.
I might missed something related to runtime pm, but this is my understanding.

>That doesn't seem like it's a win.
> How about creating a devm_pm_runtime_enable() instead?

I was also considered to do this but ended up moving the
pm_runtime_enable/disable instead.

-- 
Péter


More information about the Alsa-devel mailing list