Re: [PATCH v2 4/6] iio: adc: ti-ads1298: prepare for more chip families

From: Stephan Costa Barros

Date: Tue Oct 27 2026 - 22:23:06 EST


On Sun, Oct 25, 2026 at 10:27:44PM +0200, Andy Shevchenko wrote:
> > + *val = regval & ADS1298_MASK_CONFIG3_VREF_4V ?
> > + ADS1298_VREF_4V_MV : info->vref_mv;
>
> Can't we assign the default and always use info->vref_mV here?

Yes. The ADS129x has two internal references (2.4 V, or 4 V with
VREF_4V) and the ADS1299 one (4.5 V). In v3 init chooses the reference
once and keeps it, and read_raw only uses it.

> I think this patch is overloaded. You need to split it to a series (to make
> chip_info a separate preparatory change, for example).

Agreed, Jonathan asked for it too. chip_info becomes its own
preparatory patch. The _mV names, pahole, MICRO / MILLI, -ENODATA and
the single line: will do.

Thanks,
Stephan