[EXT] Re: [PATCH v3 4/4] soc: imx8m: change to use platform driver

Alice Guo alice.guo at nxp.com
Wed Nov 18 09:07:41 EST 2020



> -----Original Message-----
> From: Krzysztof Kozlowski <krzk at kernel.org>
> Sent: 2020年11月18日 18:42
> To: Alice Guo <alice.guo at nxp.com>
> Cc: robh+dt at kernel.org; shawnguo at kernel.org; s.hauer at pengutronix.de;
> dl-linux-imx <linux-imx at nxp.com>; Peng Fan <peng.fan at nxp.com>;
> devicetree at vger.kernel.org; linux-kernel at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [EXT] Re: [PATCH v3 4/4] soc: imx8m: change to use platform
> driver
> 
> Caution: EXT Email
> 
> On Wed, Nov 18, 2020 at 10:28:47AM +0000, Alice Guo wrote:
>  >
> > > If it is properly explained and there is no other way then yes, you
> > > could. Here, for old DTBs, I would prefer to use
> > > of_platform_device_create() and bind to "soc" node (child of root).
> > > This way you would always have device and exactly one entry point
> > > for the probe.
> > >
> >
> > static struct platform_driver imx8_soc_init_driver = {
> >       .probe = imx8_soc_init_probe,
> >       .driver = {
> >               .name = "soc at 0",
> >       },
> > };
> > Can I use "soc at 0" to match this driver? It will not use
> > of_platform_device_create(). It will use of_find_property() to
> > determine whether and nvmem-cells can be used. If there is no nvmem-cells,
> it will use the old way, which supports old DTBS. There is no need to add new
> compatible.
> 
> No, the soc at 0 is not a proper name for the driver.

I have no good idea, please give suggestion. Should I still add new compatible?
Should I still keep device_initcall? If use of_platform_device_create(), which
node should I use?

Best regards,
Alice Guo

> Best regards,
> Krzysztof


More information about the linux-arm-kernel mailing list