Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lakshay Piplani" <lakshay.piplani@nxp.com>
Cc: robh@kernel.org, conor+dt@kernel.org, Frank.Li@kernel.org,
	devicetree@vger.kernel.org, linux-i3c@lists.infradead.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH v15 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator
Date: Mon, 17 Aug 2026 10:52:27 +0000	[thread overview]
Message-ID: <20260817105228.4D7C51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817103844.2142802-5-lakshay.piplani@nxp.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Driver-specific shared header `p3h2840.h` is improperly placed in the global `include/linux/mfd/` directory instead of being local to `drivers/mfd/`.
- [Low] `struct i2c_device_id` array uses a positional initializer instead of a named initializer.
--

--- Patch [4]: [PATCH v15 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator ---
commit b12649d8bd1516b7d9cfa69f8a2a7bc8f4a10164
Author: Aman Kumar Pandey <aman.kumarpandey@nxp.com>

mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator

This commit adds core MFD support for the NXP P3H2x4x family of multiport
I3C hub devices. It provides driver support using both I3C and I2C
communication interfaces, allowing sub-drivers to be enabled independently.

> diff --git a/drivers/mfd/p3h2840.c b/drivers/mfd/p3h2840.c
> new file mode 100644
> index 0000000000000..6c497d84e2bda
> --- /dev/null
> +++ b/drivers/mfd/p3h2840.c
[ ... ]
> +static const struct i3c_device_id p3h2x4x_i3c_ids[] = {
> +	I3C_CLASS(I3C_DCR_HUB, NULL),
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(i3c, p3h2x4x_i3c_ids);
> +
> +static const struct i2c_device_id p3h2x4x_i2c_id_table[] = {
> +	{ "nxp-i3c-hub" },

[Severity: Low]
Does this code use a positional initializer instead of a named initializer?

According to I2C subsystem guidelines, initialized arrays of type
struct i2c_device_id must use named initializers (e.g., .name = "nxp-i3c-hub").

> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(i2c, p3h2x4x_i2c_id_table);
[ ... ]
> diff --git a/include/linux/mfd/p3h2840.h b/include/linux/mfd/p3h2840.h
> new file mode 100644
> index 0000000000000..eb4792de5440e
> --- /dev/null
> +++ b/include/linux/mfd/p3h2840.h
[ ... ]
> +struct p3h2x4x_i3c_hub_dev;
> +
> +struct p3h2x4x {
> +	struct i3c_device *i3cdev;
> +	struct regmap *regmap;

[Severity: Low]
Is it necessary to place this driver-specific shared header in the global
include/linux/mfd/ directory?

The MFD subsystem guidelines recommend keeping driver-specific header files
local to drivers/mfd/ if they are only used by the parent and its immediate
children.

> +	/* Number of downstream target ports (4 or 8). */
> +	u8 num_target_ports;
> +	/* Serializes protected register unlock/lock sequences across MFD children. */
> +	struct mutex protected_reg_lock;
> +	/* Hub context for the IBI handler to reach hub state via the parent i3cdev. */
> +	struct p3h2x4x_i3c_hub_dev *i3c_hub_priv;
> +};
> +#endif /* _LINUX_MFD_P3H2840_H */

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260817103844.2142802-1-lakshay.piplani@nxp.com?part=4

  reply	other threads:[~2026-08-17 10:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 10:38 [PATCH v15 0/8] Add support for NXP P3H2x4x I3C hub driver Lakshay Piplani
2026-08-17 10:38 ` [PATCH v15 1/8] i3c: master: Add APIs for I3C hub support Lakshay Piplani
2026-08-17 10:50   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 2/8] i3c: master: Add controller-only device operation helpers Lakshay Piplani
2026-08-17 10:50   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 3/8] dt-bindings: i3c: Add NXP P3H2x4x i3c-hub support Lakshay Piplani
2026-08-17 10:49   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator Lakshay Piplani
2026-08-17 10:52   ` sashiko-bot [this message]
2026-08-17 10:38 ` [PATCH v15 5/8] regulator: p3h2x4x: Add driver for on-die regulators in NXP P3H2x4x i3c hub Lakshay Piplani
2026-08-17 10:51   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 6/8] i3c: hub: Add support for the I3C interface in the I3C hub Lakshay Piplani
2026-08-17 10:53   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 7/8] i3c: hub: p3h2x4x: Add support for NXP P3H2x4x I3C hub functionality Lakshay Piplani
2026-08-17 10:51   ` sashiko-bot
2026-08-17 10:38 ` [PATCH v15 8/8] i3c: hub: p3h2x4x: Add SMBus slave mode support Lakshay Piplani
2026-08-17 11:04   ` sashiko-bot

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=20260817105228.4D7C51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lakshay.piplani@nxp.com \
    --cc=linux-i3c@lists.infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox