lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] clk: imx8mp: register driver at arch_initcall time
From
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

\
 
 \ /
  Last update: 2022-11-21 10:45    [W:0.062 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site