Re: [PATCH] ASoC: da7219: read fmw property to get mclk for non-dts systems

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

 



On Mon, Mar 04, 2024 at 01:14:43PM -0800, cujomalainey@xxxxxxxxxxxx wrote:

> Non-dts based systems can use ACPI DSDT to pass on the mclk
> to da7219.
> This enables da7219 mclk to be linked to system clock.
> Enable/Disable of the mclk is already handled in the codec so
> platform drivers don't have to explicitly do handling of mclk.

...

> +	device_property_read_string(dev, "dlg,mclk-name", &pdata->mclk_name);
> +

...

> -	da7219->mclk = clk_get(component->dev, "mclk");
> +	if (da7219->pdata->mclk_name)
> +		da7219->mclk = clk_get(NULL, da7219->pdata->mclk_name);
> +	if (!da7219->mclk)
> +		da7219->mclk = clk_get(component->dev, "mclk");

I would never have guessed from the changelog that what this change
actually does is provide a mechanism for overriding the name we use to
request the MCLK.  I had thought this was adding clock handling to a
driver that had none.  The changelog should say what the change is
doing.

Having a firmware property for this is obviously broken for DT systems,
this should be limited to ACPI systems if it's going to be there at all.
It would be nicer if it were implementeded by having some ACPI specific
code link whatever the configured clock name is to "mclk" - I don't know
if the clock API has an equivalent to regulator_register_supply_alias()
but that's the sort of thing I'm thinking of.

Attachment: signature.asc
Description: PGP signature


[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