Thread (6 messages) 6 messages, 4 authors, 2026-02-12

Re: [PATCH] clk: scu/imx8qxp: do not register driver in probe()

From: "Danilo Krummrich" <dakr@kernel.org>
Date: 2026-02-12 17:22:42
Also in: driver-core, imx, linux-clk, lkml

On Wed Feb 11, 2026 at 3:59 PM CET, Daniel Baluta wrote:
On 2/11/26 16:43, Alexander Stein wrote:
quoted
Am Mittwoch, 11. Februar 2026, 15:23:16 CET schrieb Danilo Krummrich:
quoted
+{
+	int ret;
+
+	ret = platform_driver_register(&imx8qxp_clk_driver);
+	if (ret)
+		return ret;
+
+	ret = imx_clk_scu_module_init();
+	if (ret)
+		platform_driver_unregister(&imx8qxp_clk_driver);
+
+	return ret;
Also, because the logical flow is that CLK driver is uing SCU for calls I would first call
imx_clk_scu_module_init and then register the imx8qxp_clk driver. 

But there is no functionality issues your your approach too, just a better logical flow.
I now remember why I kept it this way around. If we swap it we have to call
imx_clk_scu_module_exit() in the unwind path of imx8qxp_clk_init().
Consequently, we'd have to drop __exit from imx_clk_scu_module_exit().

Please let me know what you prefer.

Thanks,
Danilo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help