From: sashiko-bot@kernel.org
To: "Oleksij Rempel" <o.rempel@pengutronix.de>
Cc: robh@kernel.org, linux-hwmon@vger.kernel.org,
conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v15 3/6] mfd: mc33978: Add NXP MC33978/MC34978 MSDI support
Date: Fri, 10 Jul 2026 10:25:17 +0000 [thread overview]
Message-ID: <20260710102517.B69CC1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260710101358.2606941-4-o.rempel@pengutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The MFD core driver logic is located outside the drivers/mfd/ directory, which violates the MFD subsystem architectural layering guidelines.
--
--- Patch [3]: [PATCH v15 3/6] mfd: mc33978: Add NXP MC33978/MC34978 MSDI support ---
commit 09f08b1f8383cdd24c190a2b668c57a0b16e814d
Author: Oleksij Rempel <o.rempel@pengutronix.de>
mfd: mc33978: Add NXP MC33978/MC34978 MSDI support
This commit adds the Multi-Function Device (MFD) driver for the NXP MC33978
and MC34978 Multiple Switch Detection Interfaces (MSDI), setting up the SPI
device, regulators, and instantiating child devices.
> diff --git a/drivers/mfd/mc33978.c b/drivers/mfd/mc33978.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/mfd/mc33978.c
[ ... ]
> +static int mc33978_probe(struct spi_device *spi)
> +{
[ ... ]
> + /*
> + * Core module creates regmap/IRQ domain/event handling. Separated
> + * because custom SPI protocol needs complex regmap_bus implementation.
> + *
> + * API contract: mc33978_core_init() initializes domain_out to NULL on
> + * entry. On success (return 0), domain_out is guaranteed to point to a
> + * valid IRQ domain. On error, domain_out remains NULL. This allows
> + * safe dereference of ddata->domain below without NULL check after
> + * verifying ret == 0.
> + */
> + ret = mc33978_core_init(dev, spi, &ddata->domain);
> + if (ret)
> + return ret;
[Severity: Medium]
Does this violate the MFD subsystem architectural layering guidelines?
The MFD core driver logic, including regmap setup, IRQ domains, and event
harvesting, appears to be located outside the drivers/mfd/ directory in
mc33978_core_init().
As noted in the commit message, the core driver was placed in platform/misc.
Subsystem rules require core MFD drivers and logic to be located in
drivers/mfd/ to ensure the complex parts of the driver receive proper
maintainer review. Placing it outside bypasses this process.
Could this core logic be moved into drivers/mfd/ alongside the rest of the
MFD registration?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710101358.2606941-1-o.rempel@pengutronix.de?part=3
next prev parent reply other threads:[~2026-07-10 10:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 10:13 [PATCH v15 0/6] mfd: Add support for NXP MC33978/MC34978 MSDI Oleksij Rempel
2026-07-10 10:13 ` [PATCH v15 1/6] dt-bindings: pinctrl: add " Oleksij Rempel
2026-07-10 10:19 ` sashiko-bot
2026-07-10 10:13 ` [PATCH v15 2/6] platform: misc: add NXP MC33978/MC34978 core driver Oleksij Rempel
2026-07-10 10:24 ` sashiko-bot
2026-07-10 10:13 ` [PATCH v15 3/6] mfd: mc33978: Add NXP MC33978/MC34978 MSDI support Oleksij Rempel
2026-07-10 10:25 ` sashiko-bot [this message]
2026-07-10 10:13 ` [PATCH v15 4/6] pinctrl: add NXP MC33978/MC34978 pinctrl driver Oleksij Rempel
2026-07-10 10:27 ` sashiko-bot
2026-07-10 15:22 ` Alvin Šipraga
2026-07-11 5:21 ` Oleksij Rempel
2026-07-10 10:13 ` [PATCH v15 5/6] hwmon: add NXP MC33978/MC34978 driver Oleksij Rempel
2026-07-10 10:23 ` sashiko-bot
2026-07-12 22:20 ` Uwe Kleine-König
2026-07-13 13:20 ` Guenter Roeck
2026-07-13 15:13 ` Uwe Kleine-König
2026-07-10 10:13 ` [PATCH v15 6/6] mux: add NXP MC33978/MC34978 AMUX driver Oleksij Rempel
2026-07-10 10:25 ` sashiko-bot
2026-07-10 12:53 ` Alvin Šipraga
2026-07-12 22:18 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260710102517.B69CC1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.