Re: [PATCH v4] mfd: core: Support auxiliary device
From: Raag Jadav
Date: Fri May 02 2025 - 18:01:32 EST
On Thu, May 01, 2025 at 01:50:28PM +0100, Lee Jones wrote:
> On Mon, 28 Apr 2025, Raag Jadav wrote:
>
> > Extend MFD subsystem to support auxiliary child device. This is useful
> > for MFD usecases where parent device is on a discoverable bus and doesn't
> > fit into the platform device criteria. Purpose of this implementation is
> > to provide discoverable MFDs just enough infrastructure to register
> > independent child devices without abusing the platform device.
> >
> > Current support is limited to just PCI type MFDs, but this can be further
> > extended to support other types like USB in the future.
> >
> > Signed-off-by: Raag Jadav <raag.jadav@xxxxxxxxx>
> > ---
> >
> > v2: Introduce a shared struct mfd_aux_device
> > Introduce auxiliary device opt-in flag
> >
> > v3: Fix device_type ABI breakage (Andy)
> > Aesthetic adjustments (Andy)
> >
> > v4: s/mfd_aux/maux
> > Allow num_resources for child device (Andy)
> > Fix build warning (Andy)
> >
> > drivers/mfd/Kconfig | 2 +-
> > drivers/mfd/Makefile | 2 +-
> > drivers/mfd/mfd-aux.c | 156 +++++++++++++++++++++++++++++++
>
> This looks like mostly duplicated platform device code.
>
> If you are _certain_ that it needs to exist, you need to push it out to
> the auxiliary subsystem and remove any traces of it being MFD related.
>
> If it's needed by MFD, it'll be needed by other auxiliary users. Even
> if not now, sometime in the future.
Greg, if you are okay with this, please let me know. Or perhaps suggest
a better alternative.
Raag