[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c00566a9-3a3e-4c12-ab83-5e006d9273dc@oss.nxp.com>
Date: Mon, 4 Nov 2024 13:29:00 +0200
From: Andrei Stefanescu <andrei.stefanescu@....nxp.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Chester Lin <chester62515@...il.com>,
Matthias Brugger <mbrugger@...e.com>,
Ghennadi Procopciuc <Ghennadi.Procopciuc@....com>,
Larisa Grigore <larisa.grigore@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, Lee Jones <lee@...nel.org>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, Dong Aisheng <aisheng.dong@....com>,
Jacky Bai <ping.bai@....com>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, NXP S32 Linux Team <s32@....com>,
Christophe Lizzi <clizzi@...hat.com>, Alberto Ruiz <aruizrui@...hat.com>,
Enric Balletbo <eballetb@...hat.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>, imx@...ts.linux.dev
Subject: Re: [PATCH v5 2/7] mfd: nxp-siul2: add support for NXP SIUL2
Hi Krzysztof,
On 02/11/2024 10:52, Krzysztof Kozlowski wrote:
> On Fri, Nov 01, 2024 at 10:06:08AM +0200, Andrei Stefanescu wrote:
>> +static int nxp_siul2_probe(struct platform_device *pdev)
>> +{
>> + struct nxp_siul2_mfd *priv;
>> + int ret;
>> +
>> + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
>> + if (!priv)
>> + return -ENOMEM;
>> +
>> + priv->num_siul2 = S32G_NUM_SIUL2;
>> + priv->siul2 = devm_kcalloc(&pdev->dev, priv->num_siul2,
>> + sizeof(*priv->siul2), GFP_KERNEL);
>> + if (!priv->siul2)
>> + return -ENOMEM;
>> +
>> + platform_set_drvdata(pdev, priv);
>> + ret = nxp_siul2_parse_dtb(pdev);
>> + if (ret)
>> + return ret;
>> +
>> + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO,
>> + nxp_siul2_devs, ARRAY_SIZE(nxp_siul2_devs),
>> + NULL, 0, NULL);
>> +}
>> +
>> +static const struct of_device_id nxp_siul2_dt_ids[] = {
>> + { .compatible = "nxp,s32g2-siul2" },
>> + { .compatible = "nxp,s32g3-siul2" },
>
> So devices are comaptible? Why doesn't your binding express it?
Yes, as far as I know, there is no difference in the integration
of the SIUL2 module for S32G2 and S32G3 SoCs. I am not sure how
to express this compatibility. Should I mention the "nxp,s32g3-siul2"
compatible as a fallback one?
Best regards,
Andrei
>
>> + { },
>> +};
>> +MODULE_DEVICE_TABLE(of, nxp_siul2_dt_ids);
>> +
>> +static struct platform_driver nxp_siul2_mfd_driver = {
>> + .driver = {
>> + .name = "nxp-siul2-mfd",
>> + .of_match_table = nxp_siul2_dt_ids,
>> + },
>> + .probe = nxp_siul2_probe,
>> +};
>
> Best regards,
> Krzysztof
>
Powered by blists - more mailing lists