Re: [PATCH v6 09/10] iio: adc: ad4080: add driver support

From: Jonathan Cameron
Date: Sun May 18 2025 - 13:14:41 EST


On Fri, 16 May 2025 11:26:29 +0300
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote:

> Add support for AD4080 high-speed, low noise, low distortion,
> 20-bit, Easy Drive, successive approximation register (SAR)
> analog-to-digital converter (ADC).
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
I'm not sure why by the patch I got from b4 for this was subtly corrupted
at the end. I just deleted the non patch part and it was fine.

One other issue below that I fixed up.



> +static ssize_t ad4080_get_filter_type(struct iio_dev *dev,

should return an int.

> + const struct iio_chan_spec *chan)
> +{
> + struct ad4080_state *st = iio_priv(dev);
> + unsigned int data;
> + int ret;
> +
> + ret = regmap_read(st->regmap, AD4080_REG_FILTER_CONFIG, &data);
> + if (ret)
> + return ret;
> +
> + return FIELD_GET(AD4080_FILTER_CONFIG_FILTER_SEL_MSK, data);
> +}