[lkml]   [2019]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

> +module_init(imx_scu_soc_init);
> +module_exit(imx_scu_soc_exit);

Please don't make this a module


 \ /
  Last update: 2019-05-15 12:05    [W:0.931 / U:2.096 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site