Re: [PATCH v2 2/3] iio: amplifiers: adl8113: add driver support

From: Jonathan Cameron

Date: Sat Nov 15 2025 - 13:12:58 EST



> > > +
> > > +static int adl8113_read_raw(struct iio_dev *indio_dev,
> > > + struct iio_chan_spec const *chan,
> > > + int *val, int *val2, long mask)
> > > +{
> > > + struct adl8113_state *st = iio_priv(indio_dev);
> > > + int ret;
> > > +
> > > + switch (mask) {
> > > + case IIO_CHAN_INFO_HARDWAREGAIN:
> > > + switch (st->current_mode) {
> > > + case ADL8113_INTERNAL_AMPLIFIER:
> > > + *val = 14;
> > > + *val2 = 0;
> > > + ret = IIO_VAL_INT_PLUS_MICRO_DB;
> > return ...
> >
> > > + break;
> > > + case ADL8113_INTERNAL_BYPASS:
> > > + *val = 0;
> > > + *val2 = 0;
> > gain of bypass = 1.0 rather than 0.0 which is open circuit gain.
> Isn't this supposed to be a dB value since I am returning IIO_VAL_INT_PLUS_MICRO_DB? Linear gain of 1 = 0dB.

Good point. I missed the DB type.


Thanks,

J