Hi, Leonard > -----Original Message----- > From: Leonard Crestez > Sent: Wednesday, May 15, 2019 6:05 PM > To: Anson Huang <[email protected]> > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; Abel Vesa > <[email protected]>; [email protected]; linux-arm- > [email protected]; [email protected]; dl-linux-imx > <[email protected]>; Aisheng Dong <[email protected]> > Subject: Re: [PATCH V2 1/2] soc: imx: Add SCU SoC info driver support > > On 15.05.2019 11:32, Anson Huang wrote: > > Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce driver > > dependency into Kconfig as CONFIG_IMX_SCU must be selected to support > > i.MX SCU SoC driver, also need to use platform driver model to make > > sure IMX_SCU driver is probed before i.MX SCU SoC driver. > > > > With this patch, SoC info can be read from sysfs: > > > + id = of_match_node(imx_scu_soc_match, root); > > + if (!id) { > > + of_node_put(root); > > + return -ENODEV; > > + } > > Perhaps this check should be moved from imx_scu_soc_probe to > imx_scu_soc_init? As far as I can tell this "probe" function will be attempted > on all SOCs (even non-imx). Better to check if we're on a SCU-based soc early > and avoid temporary allocations.
Make sense, I will move this check block into imx_scu_soc_init() function and ONLY register platform driver when check passed. > > > +module_init(imx_scu_soc_init); > > +module_exit(imx_scu_soc_exit); > > Please don't make this a module OK, will fix it in V3. Thanks, Anson. > > -- > Regards, > Leonard

