Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Hardware Initialization Failure due to hardcoded EN7581 SCU compatible string
--
--- Patch [32]: [PATCH v9 32/36] pinctrl: airoha: add support of en7523 SoC ---
commit 61589d8a38efeb6abcc7cf58f8f68ff7e19a7f82
Author: Mikhail Kshevetskiy <[email protected]>
pinctrl: airoha: add support of en7523 SoC
This patch adds support of Airoha en7523 SoC pin controller.
> diff --git a/drivers/pinctrl/airoha/pinctrl-en7523.c b/drivers/pinctrl/airoha/pinctrl-en7523.c
> new file mode 100644
> index 0000000000000..91490418e9ab1
> --- /dev/null
> +++ b/drivers/pinctrl/airoha/pinctrl-en7523.c
> @@ -0,0 +1,1156 @@
[ ... ]
> +static const struct of_device_id airoha_pinctrl_of_match[] = {
> + { .compatible = "airoha,en7523-pinctrl", .data = &pinctrl_match_data },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, airoha_pinctrl_of_match);
> +
> +static struct platform_driver airoha_pinctrl_driver = {
> + .probe = airoha_pinctrl_probe,
[Severity: High]
This isn't a bug introduced by this patch, but will this probe succeed on the
EN7523 platform?
Looking at the shared airoha_pinctrl_probe() function in pinctrl-airoha.c,
it unconditionally hardcodes the EN7581 SCU compatible string:
drivers/pinctrl/airoha/pinctrl-airoha.c:airoha_pinctrl_probe() {
...
map = syscon_regmap_lookup_by_compatible("airoha,en7581-chip-scu");
if (IS_ERR(map))
return PTR_ERR(map);
...
}
Since the EN7523 device tree uses a different compatible string for its SCU,
won't this lookup fail with -ENODEV and cause the pin controller driver
initialization to abort?
> + .driver = {
> + .name = "pinctrl-airoha-en7523",
> + .of_match_table = airoha_pinctrl_of_match,
> + },
> +};
> +module_platform_driver(airoha_pinctrl_driver);
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=32
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.