[PATCH v8 05/12] clk: zte: Add Clock registration infrastructure
Stefan Dösinger
stefandoesinger at gmail.com
Tue Jul 28 14:25:34 PDT 2026
Hi Brian,
Thanks for the review!
Am Dienstag, 28. Juli 2026, 16:53:17 Ostafrikanische Zeit schrieben Sie:
> Looking into the other patches. There's more mixing of the clk provider
> calling the clk consumer APIs here. It looks like this just takes a
> reference and holds them. Would moving to parent_data address this?
I think so. parent_data::fw_name is indeed something I have been looking for
and didn't stumble across myself. And I suspect when you say "use
parent_data", you don't mean "use parent_data.name everywhere".
But it raises the question of how to handle internal clocks, e.g. foo_gate-
>foo_div->foo_mux->clock-26m. Only "clock-26m" is passed through the DT and
found via fw_name, and only foo_gate is exported.
For the other clocks I currently rely on the string matching to resolve the
parent named in the static init data to an actual registered clk_hw. The
alternative I see is storing the struct clk_hw * in a table by index and pass
it in parent_data.hw, but that'd require managing the extra indices. Or build
a clock-local name->clk_hw lookup, but then I am just reinventing the old name
matching.
Am I missing something obvious? Is there a canonical implementation somewhere
that implements modern best practices? I learned that looking at existing
drivers isn't always a reliable guide.
Cheers,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 870 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-phy/attachments/20260729/3bacd703/attachment.sig>
More information about the linux-phy
mailing list