[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <z5ky5g46tsdmrabplgjbt3ahlnkn7gljkwsxjshwpkdqqnirwr@wavvhc2wudlh>
Date: Sat, 2 Nov 2024 09:52:39 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Andrei Stefanescu <andrei.stefanescu@....nxp.com>
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
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?
> + { },
> +};
> +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