Re: [PATCH 2/6] iio: adc: ad7887: drop platform data support

From: Nuno Sá

Date: Thu Nov 26 2026 - 05:31:04 EST


On Wed, Nov 25, 2026 at 12:35:16PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 25, 2026 at 10:19:18AM +0000, Nuno Sá wrote:
> > There are no in-tree users of struct ad7887_platform_data, and the
> > driver works fine without it. Its only knob, en_dual, selects dual
> > channel mode, where the AIN1/VREF pin is used as a second input.
> >
> > Drop the platform data header and default to single channel mode, which
> > is what the driver does when no platform data is given. The dual
> > channel code is kept so it can be enabled again should someone need it
> > and add a firmware property for it.
>
> ...
>
> > + /*
> > + * Dual channel mode could only be enabled through platform data, which
> > + * had no users. Keep the support around in case someone needs it and
> > + * adds a firmware property for it.
> > + */
>
> This patch removed the platform_data, hence the first sentence in this comment
> at least confusing. Just drop it?

Can do that, yes.

- Nuno Sá

>
> > + bool en_dual = false;
>
> --
> With Best Regards,
> Andy Shevchenko
>
>