Re: [PATCH] dt-bindings: clock: add clock definitions for Ralink SoCs
From: Krzysztof Kozlowski
Date: Mon Jan 13 2025 - 07:37:51 EST
On 13/01/2025 13:29, Sergio Paracuellos wrote:
>>>
>>>> 2. What is the point of this? We do not add constants when there are no
>>>> users. Commit msg explains here nothing.
>>>
>>> All of the old ralink SoCs' dts files which are in the tree are not
>>> properly updated. I expect to have them updated somewhere in time
>>> merging real base stuff from openwrt dts [0] files. Not having this
>>> header with definitions makes very hard to update dts and then
>>> checking the driver code becomes a need to see the indexes for the
>>> clocks to properly setup a consumer node. Because of this, this file
>>> is added here.
>>
>> Still there is no point without the users. I do not see any reason why
>> this cannot be combined with fixing driver to use the header. Not
>> combining is an indication this is not a binding in the first place.
>
> Driver uses a bunch of arrays for the clocks (base, fixed, factor and
> peripheral) and they are registered consecutively in order just using
> the ARRAY_SIZE macro for any of them. Thus, the direct application of
> these definitions would be for dts consumer nodes, not the driver
> itself.
So what do you constants here fix? Driver can still reorganize arrays
breaking everything. If defining headers for proper ABI, then use that
ABI to make everything build-time testable and visible. That's why this
is not supposed to be a separate patch from users.
Best regards,
Krzysztof