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

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

From: Daniel Baluta <hidden>
Date: 2026-02-12 19:43:22
Also in: driver-core, imx, linux-clk, lkml

On Thu, Feb 12, 2026 at 7:22 PM Danilo Krummrich [off-list ref] wrote:
On Wed Feb 11, 2026 at 3:59 PM CET, Daniel Baluta wrote:
quoted
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.
I see. I prefer your initial implementation then maybe with an
explanation in the commit message.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help