RE: [PATCH 1/3] gpio: mxc: Support module build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Linus

> Subject: RE: [PATCH 1/3] gpio: mxc: Support module build
> 
> Hi, Linus
> 
> > Subject: Re: [PATCH 1/3] gpio: mxc: Support module build
> >
> > On Wed, Jul 8, 2020 at 1:28 AM Anson Huang <Anson.Huang@xxxxxxx>
> > wrote:
> >
> > >  subsys_initcall(gpio_mxc_init);
> > > +
> > > +MODULE_AUTHOR("Shawn Guo <shawn.guo@xxxxxxxxxx>");
> > > +MODULE_DESCRIPTION("i.MX GPIO Driver"); MODULE_LICENSE("GPL");
> >
> > You are making this modualrizable but keeping the subsys_initcall(),
> > which doesn't make very much sense. It is obviously not necessary to
> > do this probe at subsys_initcall() time, right?
> >
> 
> If building it as module, the subsys_initcall() will be equal to module_init(), I
> keep it unchanged is because I try to make it identical when built-in, since
> most of the config will still have it built-in, except the Android GKI support.
> Does it make sense?
> 
> > Take this opportunity to convert the driver to use
> > module_platform_driver() as well.
> 
> If you think it has to be or it is better to use module_platform_driver(), I will do
> it in V2.

I tried to replace the subsys_initcall() with module_platform_driver(), but met issue
about " register_syscore_ops(&mxc_gpio_syscore_ops);" which is called in gpio_mxc_init()
function, this function should be called ONLY once, moving it to .probe function is NOT
working, so we may need to keep the gpio_mxc_init(), that is another reason that we may
need to keep subsys_initcall()?

Thanks,
Anson




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux