Re: [PATCH 6/6] iio: adc: ad7793: add firmware support and drop platform data

From: Nuno Sá

Date: Wed Nov 25 2026 - 06:12:18 EST


On Wed, Nov 25, 2026 at 12:43:39PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 25, 2026 at 10:19:22AM +0000, Nuno Sá wrote:
> > The driver refuses to probe without struct ad7793_platform_data, and
> > there are no in-tree users of it. That means the driver can not be used
> > at all on a modern system.
> >
> > Get the configuration from firmware properties instead, following the
> > new binding, and drop the platform data header:
> >
> > - The reference is REFIN (REFIN1) if refin-supply is present, REFIN2 if
> > refin2-supply is present, and the internal 1.17 V reference otherwise.
> > Parts without an internal reference need refin-supply.
> > - An external clock on the CLK pin is used if given. A 128 kHz clock
> > is divided by 2 internally.
> > - The input buffer stays enabled (as it is at power-up) unless
> > adi,buffer-disable is set, and unipolar coding is used unless bipolar
> > is set.
> > - The bias voltage generator, the burnout currents and the excitation
> > current sources get their own properties.
> >
> > While at it, also enable the AVDD and DVDD supplies, add an OF match
> > table and fold the platform data checks into the property parsing.
>
> First of all, can this be split to a few smaller changes?
> I will look at the rest later on.

I could but is it worth it? In theory this is all actually resulting of
the same change which is dropping platdata which means supporting FW and
of_id_table (the extra supplies could another patch but it comes
down to the regulator bulk reg). I'll double check if something can be spitted
but I do prefer to keep s/platdata/of_id as one single patch.

- Nuno Sá

>
> --
> With Best Regards,
> Andy Shevchenko
>
>