Re: [PATCH net-next v4 2/4] mfd: ac200: Add X-Powers AC200 support
| Newsgroups | dev.linux.lists.mfd,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The AC200 driver resides in `drivers/mfd/` but fails to instantiate any child devices, violating MFD subsystem guidelines. -- --- Patch [2]: [PATCH net-next v4 2/4] mfd: ac200: Add X-Powers AC200 support --- commit c3a5907d2032837edd51cf4fc8b2fb05a159740a Author: James Hilliard <[email protected]> mfd: ac200: Add X-Powers AC200 support This patch introduces support for the X-Powers AC200 mixed-signal companion IC. It provides shared register map access over I2C to be used by individual function drivers. The core driver handles initialization, clock configuration, and resetting of the chip. > diff --git a/drivers/mfd/ac200.c b/drivers/mfd/ac200.c > new file mode 100644 > index 0000000000000..798bb4173b14b > --- /dev/null > +++ b/drivers/mfd/ac200.c [ ... ] > +static int ac200_probe(struct i2c_client *client) > +{ [ ... ] > + ret = regmap_write(ddata->regmap, AC200_SYS_CONTROL_REG, 0); > + if (ret) > + return ret; > + > + ret = regmap_write(ddata->regmap, AC200_SYS_CONTROL_REG, > + AC200_SYS_CONTROL_CHIP_RESET_DEASSERT); > + if (ret) > + return ret; > + > + return 0; > +} [Severity: Low] Should this driver reside in drivers/mfd/ if it doesn't instantiate any child devices? The MFD subsystem guidelines explicitly state that placing a driver in drivers/mfd/ is only permitted for devices that register multiple children via the MFD API or of_platform_populate(). Here, ac200_probe() completes successfully without calling devm_mfd_add_devices() or devm_of_platform_populate(). -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2