Re: [PATCH v2 6/6] iio: adc: ti-ads1298: add ADS1299 support

From: Stephan Costa Barros

Date: Tue Oct 27 2026 - 22:30:39 EST


On Sun, Oct 25, 2026 at 10:34:17PM +0200, Andy Shevchenko wrote:
> Make this a list, see how other drivers (recently updated to support more HW)
> do it.

> Fix multi-line comment style, make the text of tristate in Kconfig, this one,
> and in the MODULE_DESCRIPTION() the same.

Will do both.

> > + /* TI sells the 8-channel part as plain ADS1299 */
> > + if (indio_dev->num_channels == ADS1298_MAX_CHANNELS)
> > + indio_dev->name = "ads1299";
> > + else
> > + indio_dev->name = devm_kasprintf(dev, GFP_KERNEL, "ads1299-%u",
> > + indio_dev->num_channels);
>
> Why do we need this? Can't we derive it from IIO ABI?

To name the part, as the driver already does for the ADS129x: since
ti,ads1298 was the only compatible, it builds the name from the ID
("ads129%u%s", so ads1294, ads1296r, ...). The ADS1299-4 and -6 differ
from the ADS1299 only in channel count, so the name follows the same
rule. Userspace can count the channels, but "name" is documented as the
physical chip. If you prefer "ads1299" for all three, I'll do that.

> It's not used outside of the loop, make it local to that for-loop.

Will do.

Thanks,
Stephan