Re: [PATCH 2/2] iio: adc: ad4080: configure backend data size

From: Jonathan Cameron

Date: Sat Jul 11 2026 - 20:49:12 EST


On Tue, 23 Jun 2026 18:07:39 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:

> On 6/23/26 4:07 AM, Antoniu Miclaus wrote:
> > The AXI backend needs to know the ADC word width in order to pack the
> > sample data correctly on the bus. During channel setup, program the
> > backend packet format via iio_backend_data_size_set() using the channel
> > resolution, so the data is transferred according to the device's
> > realbits.
> >
>
> Do we need a Fixes: tag?
Antoniu?

I'm holding this one for a tag or a reason why not.

Thanks,

Jonathan

>
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> > ---
> > drivers/iio/adc/ad4080.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
> > index 8d2953341b15..8feb0c7f7fcb 100644
> > --- a/drivers/iio/adc/ad4080.c
> > +++ b/drivers/iio/adc/ad4080.c
> > @@ -698,6 +698,11 @@ static int ad4080_setup_channel(struct ad4080_state *st, unsigned int ch)
> > if (ret)
> > return ret;
> >
> > + ret = iio_backend_data_size_set(st->back[ch],
> > + st->info->channels[0].scan_type.realbits);
> > + if (ret)
> > + return ret;
> > +
> > if (!st->lvds_cnv_en)
> > return 0;
> >
>