Re: [RFC PATCH 02/16] ASoC: pcm512x: use "sclk" string to retrieve clock

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

 





On 4/14/20 1:27 PM, Mark Brown wrote:
On Tue, Apr 14, 2020 at 01:14:41PM -0500, Pierre-Louis Bossart wrote:
On 4/14/20 12:45 PM, Mark Brown wrote:
On Thu, Apr 09, 2020 at 02:58:27PM -0500, Pierre-Louis Bossart wrote:

Using devm_clk_get() with a NULL string fails on ACPI platforms, use
the "sclk" string as a fallback.

Is this something that could be fixed at the ACPI level?

I guess to fix this we'd need some sort of ACPI-level connection or
description of the clock, and I've never seen such a description?

Wait, so SCLK is in the *global* namespace and the provider has to
register the same name?  That doesn't sound clever.  It might be better
to have the board register the connection from the clock provider to the
device rather than hard code global namespace strings like this, that
sounds like a recipie for misery.

I believe this change has zero impact on DT platforms.

The 'sclk' is a fallback here. If you find a clock with the NULL string, it's what gets used. Likewise for the clock provider, the 'sclk' is a lookup - an alias in other words. The use of the references and phandles should work just fine for Device Tree.

It is really sad that nobody involved in producing these systems that
don't work with the current limitations in ACPI has been able to make
progress on improving ACPI so it can cope with modern hardware and we're
having to deal with this stuff.

I can't disagree but I have to live with what's available to me as an audio guy...I had a solution two years ago where I could set the clock directly from the machine driver. The recommendation at the time was to use the clk framework, but that clk framework is limited for ACPI platforms, so we can only use it with these global names.

We had the same problem on Baytrail/Cherrytrail devices some 4 years ago and we had to use an 'mclk' alias. We are going to have the same problem when we expose the SSP MCLK, BLCK and FSYNC clocks - and that's also what the Skylake driver did - we don't have a solution without global names.

All the examples I've seen use an explicit 'mclk' string (that's e.g. what
we did for the PMC clocks for Baytrail/Cherrytrail machine drivers, we added
a lookup). Here I used 'sclk' since it's what TI refers to in their
documentation.

They appear to call it SCK not SCLK.

Yes indeed, will change.





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux