[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aBIoRc-gpBswohe-@debian-BULLSEYE-live-builder-AMD64>
Date: Wed, 30 Apr 2025 10:40:21 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Marcelo Schmitt <marcelo.schmitt@...log.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
jic23@...nel.org, lars@...afoo.de, Michael.Hennerich@...log.com,
dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH v2 3/7] iio: adc: ad4170: Add support for buffered data
capture
Hi Andy, thank you for your review.
...
> > +static int ad4170_prepare_spi_message(struct ad4170_state *st)
> > +{
> > + /*
> > + * Continuous data register read is enabled on buffer postenable so
> > + * no instruction phase is needed meaning we don't need to send the
> > + * register address to read data. Transfer only needs the read buffer.
> > + */
> > + st->xfer.rx_buf = &st->rx_buf;
> > + st->xfer.len = BITS_TO_BYTES(ad4170_channel_template.scan_type.realbits);
>
> This will give, e.g., 3 for the realbits == 24. Is this expected?
Yes, in continuous read mode the ADC outputs just the conversion result bits
(24-bits) so a 3-byte length transfer is enough to get the conversion data for a
channel.
>
...
>
> > + return dev_err_probe(&st->spi->dev, ret,
> > + "Failed to register trigger\n");
>
> One line?
It goes up to 89 columns if make in one line. I know there are other places in
this driver where 80 columns are exceeded, but in this case it's easier to
avoid going beyond 80 columns without drying up the error message.
Anyway, I'll make it one line if it's confirmed to be the preferable way to have
it.
Thanks,
Marcelo
Powered by blists - more mailing lists