Re: [RFC PATCH v2 1/3] regulator: core: Add regulator_lookup_list

From: Andy Shevchenko
Date: Wed Aug 25 2021 - 07:10:54 EST


On Wed, Aug 25, 2021 at 1:34 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Wed, Aug 25, 2021 at 12:06:18AM +0100, Daniel Scally wrote:
> > In some situations regulator devices can be enumerated via either
> > devicetree or ACPI and bound to regulator drivers but without any
> > init data being provided in firmware. This leaves their consumers
> > unable to acquire them via regulator_get().
> >
> > To fix the issue, add the ability to register a lookup table to a
> > list within regulator core, which will allow board files to provide
> > init data via matching against the regulator name and device name in
> > the same fashion as the gpiod lookup table.
>
> This is the wrong level to do this I think, this is a generic problem
> that affects all kinds of platform data so if we're not going to scatter
> DMI quirks throughout the drivers like we currently do then we should
> have a way for boards to just store generic platform data for a device
> and then have that platform data joined up with the device later. This
> could for example also be used by all the laptop audio subsystems which
> need DMI quirk tables in drivers for their components to figure out how
> they're wired up and avoids the need to go through subsystems adding new
> APIs.

What you are describing sounds similar to what we have, i.e. fwnode graph.
That's how v4l2 describes complex connections between devices in the
camera world.

But IIRC you don't like this idea to be present with regulators (as
per v1 of this series).

So, what do you propose then?


--
With Best Regards,
Andy Shevchenko