[PATCH 1/2] arm64: dts: meson-g12: Fix clock order for amlogic,axg-tdm-iface devices

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Tue Aug 15 23:23:23 PDT 2023


On 10/08/2023 19:15, Kevin Hilman wrote:
> DT maintainers,
> 
> Alexander Stein <alexander.stein at mailbox.org> writes:
> 
>> Binding specify order of clocks as:
>> 1. "sclk"
>> 2. "lrclk"
>> 3. "mclk"
>> Adjust clocks accordingly. Fixes warnings:
> 
> I understand this patch is to fix DT warnings (and thank you Alexander
> for fixing warnings!) ... *but* the underlying requirement being
> enforced by the schema here seems completely wrong to me, and a step
> backwards.
> 
> Sorry if this is a FAQ someplace, but I couldn't find an explanation for
> this.  One of the main goals of introducing names in the first place was
> to get rid of ordering requirements.

Not entirely. The names was just a helper for cases when order is not
fixed, but even with the names for every regular case the order was
always strict. We always expect these to be ordered.

> Now the DT schema is enforcing
> ordering requirements, but the drivers don't need ordering, so what is
> the point of enforcing ordering requirements?

Because names are not everything. One OS implementation might still take
by indices, even if names are provided, so you cannot change the order.

Few bindings allow relaxed approach here, but these are written that way
to allow mixing order.

For few other bindings (e.g. newer Qualcomm clock controllers) we just
dropped the names entirely, because they bring little value and also
code for lookup by name is slower than by index.

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list