[PATCH v5 2/9] soc: microchip: add mfd drivers for two syscon regions on PolarFire SoC

Conor Dooley conor at kernel.org
Thu Oct 23 03:15:58 PDT 2025


On Thu, Oct 23, 2025 at 07:04:33AM +0300, Claudiu Beznea wrote:
> On 10/13/25 20:45, Conor Dooley wrote:
> > +++ b/drivers/soc/microchip/mpfs-mss-top-sysreg.c
> > @@ -0,0 +1,48 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include <linux/array_size.h>
> 
> Looks like this one can be dropped or maybe you want to use
> ARRAY_SIZE(mpfs_mss_top_sysreg_devs) as 4th argument of mfd_add_devices()
> 
> > +#include <linux/of.h>
> > +#include <linux/of_address.h>
> 
> Unused?
> 
> > +#include <linux/mfd/core.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/of_platform.h>
> 
> Unused?

This one is where devm_of_platform_populate comes from.

> 
> > +#include <linux/platform_device.h>
> > +
> > +static const struct mfd_cell mpfs_mss_top_sysreg_devs[] = {
> > +	{ .name = "mpfs-reset", },
> 
> MFD_CELL_NAME() ?
> 
> > +};
> > +
> > +static int mpfs_mss_top_sysreg_probe(struct platform_device *pdev)
> > +{
> > +	struct device *dev = &pdev->dev;
> > +	int ret;
> > +
> > +	ret = mfd_add_devices(dev, PLATFORM_DEVID_NONE, mpfs_mss_top_sysreg_devs,
> > +			      1, NULL, 0, NULL);
> > +	if (ret)
> > +		return ret;
> > +
> > +	if (devm_of_platform_populate(dev))
> > +		dev_err(dev, "Error populating children\n");
> 
> Is it OK return 0 above if there are failures here?

I think my rationale was that the mfd devices would be able to keep
working, but I think ultimately it doesn't matter much and I'll change
it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20251023/27041744/attachment.sig>


More information about the linux-riscv mailing list