RE: [PATCH 2/2] iio: adc: ad4080: configure backend data size
From: Miclaus, Antoniu
Date: Mon Jul 13 2026 - 04:10:18 EST
Hi David, Jonathan,
> -----Original Message-----
> From: Jonathan Cameron <jic23@xxxxxxxxxx>
> Sent: Sunday, July 12, 2026 3:49 AM
> To: David Lechner <dlechner@xxxxxxxxxxxx>
> Cc: Miclaus, Antoniu <Antoniu.Miclaus@xxxxxxxxxx>; Sa, Nuno
> <Nuno.Sa@xxxxxxxxxx>; Hennerich, Michael
> <Michael.Hennerich@xxxxxxxxxx>; linux <linux@xxxxxxxxxx>; linux-
> iio@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 2/2] iio: adc: ad4080: configure backend data size
>
> 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.
Will add the Fixes: tag with some extra explanation in V2 series. Sorry for the delayed response, was a bit out of office.
> 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;
> > >
> >