clk: scmi: Postpone clock name resolution
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 9 Nov 2025 01:35:08 +0000 (02:35 +0100)
committerPeng Fan <peng.fan@nxp.com>
Mon, 10 Nov 2025 12:57:48 +0000 (20:57 +0800)
commitfdb1bffe2827e6107288c57e1f2e86956fd1a2bc
tree94a0413e20cd0dfbdc301ddb897e0310d87d9cba
parent21bfe6a2911725aab6e8067408b0a265b2f35c96
clk: scmi: Postpone clock name resolution

The clock names are retrived via SCMI_CLOCK_ATTRIBUTES, called for each
clock ID. This may take a lot of time to complete and is not strictly
necessary. Register each clock as "scmi-%zu" instead, and let the first
call of SCMI_CLOCK_ATTRIBUTES fill in the actual clock name.

This has a side effect, which can be considered both an upside and also
a downside. Unused clock are never renamed and retain their placeholder
"scmi-%zu" name, which avoids empty clock names for nameless SCMI clock,
and avoids the name resolution and improves boot time. But for those
SCMI clock which do have name, that name is not listed until the clock
are used.

This is a preparatory patch for deferred issue of SCMI_CLOCK_ATTRIBUTES.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/clk/clk_scmi.c