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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 25, 2021 at 2:30 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Wed, Aug 25, 2021 at 02:10:05PM +0300, Andy Shevchenko wrote:
> > On Wed, Aug 25, 2021 at 1:34 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> > > 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
>
> > 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).
>
> No, what was proposed for regulator was to duplicate all the the DT
> binding code in the regulator framework so it parses fwnodes then have
> an API for encoding fwnodes from C data structures at runtime.  The bit
> where the data gets joined up with the devices isn't the problem, it's
> the duplication and fragility introduced by encoding everything into
> an intermediate representation that has no purpose and passing that
> around which is the problem.

The whole exercise with swnode is to minimize the driver intrusion and
evolving a unified way for (some) of the device properties. V4L2 won't
like what you are suggesting exactly because they don't like the idea
of spreading the board code over the drivers. In some cases it might
even be not so straightforward and easy.

Laurent, do I understand correctly the v4l2 expectations?

> > So, what do you propose then?
>
> I propose what I suggested above, providing a way to attach platform
> data to firmware provided devices.  Don't bother with an intermediate
> encoding, just use platform data.  Or just put quirks in the drivers
> like all the other systems using ACPI for platforms where it's not a
> good fit.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux