On Fri, 7 Feb 2025 16:09:18 +0200 Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote: > Add support for the AD485X a fully buffered, 8-channel simultaneous > sampling, 16/20-bit, 1 MSPS data acquisition system (DAS) with > differential, wide common-mode range inputs. > > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> Hi Antoniu One really trivial comment to add from me. Jonathan > diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c > new file mode 100644 > index 000000000000..01cc88ecad52 > --- /dev/null > +++ b/drivers/iio/adc/ad4851.c > @@ -0,0 +1,1316 @@ > + > +static int ad4858_parse_channels(struct iio_dev *indio_dev) > +{ > + struct ad4851_state *st = iio_priv(indio_dev); > + struct device *dev = &st->spi->dev; > + struct iio_chan_spec *ad4851_channels; > + const struct iio_chan_spec ad4851_chan = AD4858_IIO_CHANNEL; > + int ret; > + > + ret = ad4851_parse_channels_common(indio_dev, &ad4851_channels, > + ad4851_chan); > + if (ret < 0) > + return ret; > + > + device_for_each_child_node_scoped(dev, child) { > + ad4851_channels->has_ext_scan_type = 1; > + if (fwnode_property_read_bool(child, "bipolar")) { > + ad4851_channels->ext_scan_type = ad4851_scan_type_20_b; > + ad4851_channels->num_ext_scan_type = ARRAY_SIZE(ad4851_scan_type_20_b); > + Trivial but this blank line doesn't add anything useful and looks a bit odd! > + } else { > + ad4851_channels->ext_scan_type = ad4851_scan_type_20_u; > + ad4851_channels->num_ext_scan_type = ARRAY_SIZE(ad4851_scan_type_20_u); > + } > + ad4851_channels++; > + } > + > + indio_dev->channels = ad4851_channels; > + indio_dev->num_channels = ret; > + > + return 0; > +}