12 Oct
2020
12 Oct
'20
5:48 p.m.
On Mon, Oct 12, 2020 at 04:55:27PM +0300, Andy Shevchenko wrote:
Currently those drivers need to do something like:
if (of_property_is_present("dma-names")) ret = try DMA mode; else ret = try PIO mode;
but this seems to me a bit stricter than needed. What if DMA mode fails, shall we fail the probe of the driver?
They can also just try registering DMA and fall back to PIO.
If ASoC supports optional DMA resources, above can be simplified to something like:
ret = try DMA mode; if (ret != DMA mode ok) ret = try PIO mode;
which makes OF dependent parts gone along with relying on the properties rather than real resource availability.
I don't understand the blocker to writing that code at the minute?