Messages in this thread | | | Date | Mon, 21 Nov 2022 10:44:22 +0100 | Subject | Re: [PATCH] clk: imx8mp: register driver at arch_initcall time | From | Rasmus Villemoes <> |
| |
On 19/11/2022 23.02, Fabio Estevam wrote: > On Sat, Nov 19, 2022 at 6:57 PM Rasmus Villemoes > <linux@rasmusvillemoes.dk> wrote: > >> Sorry, I don't follow. Before this patch, the driver also implicitly had >> a module_exit() doing exactly this platform_driver_unregister(), it was >> just hidden inside the module_platform_driver() macro. And I think >> that's necessary if one wants to test that the module can be loaded and >> unloaded (I don't think it's ever useful or even possible to have it be >> a module on an actual imx8mp board). > > You cannot load/unload it due to .suppress_bind_attrs = true, being passed.
That doesn't seem to be true. To test, I just built the imx8mq clk driver as a module, and I could certainly both load and unload that on my imx8mp platform. Sure, no "bind" attribute shows up in the /sys/bus/platform/drivers/imx8mq-ccm/ directory, which is exactly what one expects, but the module can be loaded just fine. And since it can be loaded, it should also have a proper __exit call for deregistering the driver on unload.
Rasmus
| |