Re: [PATCH v1] mfd: core: Support auxiliary device

From: Raag Jadav
Date: Fri Apr 04 2025 - 07:36:59 EST


On Thu, Apr 03, 2025 at 03:02:47PM +0100, Greg KH wrote:
> On Thu, Apr 03, 2025 at 04:30:53PM +0530, 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. Current support is limited to just PCI
> > devices, but this can be further extended to support other types like USB
> > in the future.

...

> > 2. Should we allow auxiliary drivers to manage their own resources
> > (MEM, IO, IRQ etc)?
>
> The resources are all shared by the "parent" device, that's what makes
> aux drivers work, they need to handle this as there is no unique way to
> carve up the resources here.
>
> So I don't know how you would do this, sorry.

Perhaps we can carve it up in mfd_add_devices() using start and end members
and error out if they overlap.

Can't we still have a struct resource that is unique to that specific
auxiliary device?

Raag