Thread (24 messages) 24 messages, 7 authors, 2023-02-16

Re: [PATCH 2/3] dt-bindings: hwlock: sun6i: Add missing names

From: Andre Przywara <andre.przywara@arm.com>
Date: 2023-02-14 12:12:26
Also in: linux-arm-kernel, linux-remoteproc, linux-sunxi, lkml

On Tue, 14 Feb 2023 09:45:54 +0000
Wilken Gottwalt [off-list ref] wrote:

Hi,
On Tue, 14 Feb 2023 00:19:29 +0100
Bastian Germann [off-list ref] wrote:
quoted
The allwinner,sun6i-a31-hwspinlock.yaml binding needs clock-names
and reset-names set to "ahb" as required by the driver.  
Hmm, this one is a bit odd. If you look into my earlier versions of the
patchset, you may notice, that I actually included these bindings and they
were refused. I think the argumentation was like
"there is only one bus = no need for it".
That's interesting, because your driver implementation relies on there
being a clock name. And if I chased down devm_clk_get() correctly, there
must be a named clock in the DT, otherwise it would fail? I haven't tested
this, though, but I guess this is the  reason for Bastian's patch.

Regarding "one bus clock only": while this is true, I think there
is (or was?) also the rationale of using names being more future-proof, so
adding clocks (for future hardware revisions) can be done more easily,
without breaking compatibility. It's not a big problem, since you probably
have a new compatible string in this case anyway, but it also doesn't
hurt, and allows to use more generic helpers like devm_clk_get().
If it gets accepted now, I really like to know why. (It was some trouble
back then to get the documentation properly done and accepted.)
IIUC, it simply doesn't work without a clock-names property.
 
Cheers,
Andre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help