Re: [PATCH 0/2] iio: adc: add LTC2387 and ADAQ2387x support

From: Andy Shevchenko

Date: Sat Oct 31 2026 - 04:37:03 EST


On Fri, Oct 30, 2026 at 05:07:05PM +0200, Nicolae-Daniel Deaconescu wrote:
> On Fri, 30 Oct 2026 16:41:27 +0200, Andy Shevchenko wrote:
> > But these difference doesn't explain why you need a brand new driver.
> > Is hard to configure this at run-time by choosing the respective driver
> > data based on the compatible string?
>
> Looking at ad7625.c again, most of it can come from chip data,
> like the driver already does for max_sample_freq_hz. The lack of
> en pins could probably also be parametrized.
>
> However, doing it this way would risk clashing with the sampling
> path of the existing driver. Keeping it separate would make testing
> easier, as well as isolating drivers for unrelated families, which
> might be out of scope for this.

> Ultimately I think keeping them separate would be simpler, but
> I'll integrate it if you believe it's worth it. We might also
> need to consult with the authors of the original driver, as I
> haven't worked with the ad7625 before.

If there is no big differences on RTL or programming flow, no need to create
a brand new driver. Even if there are some differences which are minor, we
may quirk that in the code. See infamous drivers/gpio/gpio-pca953x.c for how
many similar, but not fully chips are supported. With your elaboration above
I believe we may join these drivers to the existing one.

--
With Best Regards,
Andy Shevchenko