Re: [PATCH v7 3/3] iio: adc: ti-ads1100: Add ti-ads1110 support to ti-ads1100 driver

From: Andy Shevchenko

Date: Wed Jul 15 2026 - 02:42:49 EST


On Tue, Jul 14, 2026 at 03:18:04PM -0500, David Lechner wrote:
> On 7/14/26 2:55 PM, Jakub Szczudlo wrote:

...

> > #define ADS1100_SLEEP_DELAY_MS 2000
> > +#define ADS1110_INTERNAL_REF_mV 2048
>
> Maybe the diff is messing with the tabs, but I hope the
> numbers are vertically aligned.

They are. Remove the quoting in your MUA and you will see that.

...

> > static int ads1100_read_raw(struct iio_dev *indio_dev,
> > int *val2, long mask)
> > {
> > int ret;
> > + int data_rate_index;
> > struct ads1100_data *data = iio_priv(indio_dev);

Likewise in the rest of the (new) code, try to follow it the reversed xmas tree
order

int ret;
struct ads1100_data *data = iio_priv(indio_dev);
int data_rate_index;

...

> > + data->ads_config = i2c_get_match_data(client);
> > + if (!data->ads_config)
> > + return dev_err_probe(dev, -EINVAL,
>
> Andy has been pushing to use ENODEV for these. Current situation
> is about equal numbers of EINVAL and ENODEV in existing drivers.
> Would be good to pick one and stick with it for new code.

Maybe -ENODATA as you suggested? Sounds perhaps better?
I saw the code where this kind of call and followed by it both use -ENODEV,
and after thinking of your suggestion I now tend towards -ENODATA.

> > + "Can't get device data from firmware\n");

--
With Best Regards,
Andy Shevchenko