[PATCH v18 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Sep 2 23:35:11 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Driver-specific header file is placed in the global include/linux/mfd/ directory instead of drivers/mfd/.
--

commit 444703ed004628dc8c71d675917535f1a724bb53
Author: Aman Kumar Pandey <aman.kumarpandey at 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 support for the I3C hub and regulator subdevices
using a shared register interface over I3C or I2C.

> 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 {
> +	struct i3c_device *i3cdev;
> +	struct regmap *regmap;
> +	/* 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;
> +};

[Severity: Low]
Since struct p3h2x4x is only shared by the MFD parent and its immediate
regulator and i3c-hub children, shouldn't this header file be kept local
to drivers/mfd/ rather than being placed in the global include/linux/mfd/
directory?

The MFD subsystem guidelines recommend avoiding global include directory
pollution for driver-specific headers unless they are consumed outside the
immediate parent-child hierarchy.

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



More information about the linux-i3c mailing list