Re: [PATCH V2 1/4] gpio: mxc: Support module build
From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-07-22 08:15:26
Also in:
linux-gpio, lkml
On Wed, Jul 22, 2020 at 3:50 AM Anson Huang [off-list ref] wrote:
Change config to tristate, add module device table, module author, description and license to support module build for i.MX GPIO driver. As this is a SoC GPIO module, it provides common functions for most of the peripheral devices, such as GPIO pins control, secondary interrupt controller for GPIO pins IRQ etc., without GPIO driver, most of the peripheral devices will NOT work properly, so GPIO module is similar with clock, pinctrl driver that should be loaded ONCE and never unloaded. Since MXC GPIO driver needs to have init function to register syscore ops once, here still use subsys_initcall(), NOT module_platform_driver().
I'm not following this explanation.
Why is this driver using syscore_ops rather than
SIMPLE_DEV_PM_OPS() or similar?
Why can the driver not unregister the syscore_ops the way it
registers them when unloading the module?
Why do you need subsys_initcall() rather than a device_initcall()?
If the subsys_initcall() is indeed required here instead of
device_initcall(), how can it work if the driver is a loadable
module?
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel