Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Julien Stephan <jstephan@baylibre.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"kernel test robot" <lkp@intel.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC v6 10/10] iio: adc: ad7380: add support for resolution boost
Date: Mon, 6 May 2024 16:45:06 -0500	[thread overview]
Message-ID: <CAMknhBEFdCMHt4-iDhNA2S3KpT=EYX53gDQjnQAu+Ph-gzO7GQ@mail.gmail.com> (raw)
In-Reply-To: <20240501-adding-new-ad738x-driver-v6-10-3c0741154728@baylibre.com>

On Wed, May 1, 2024 at 9:56 AM Julien Stephan <jstephan@baylibre.com> wrote:
>

...

>
> +static int ad7380_prepare_spi_xfer(struct ad7380_state *st, struct spi_transfer *xfer)
> +{
> +       int bits_per_word;
> +
> +       memset(xfer, 0, sizeof(*xfer));
> +
> +       xfer->rx_buf = &st->scan_data.raw;
> +
> +       if (st->resolution_boost_enable == RESOLUTION_BOOST_ENABLE)
> +               bits_per_word = st->chip_info->channels[0].scan_type.realbits;
> +       else
> +               bits_per_word = st->chip_info->channels[0].scan_type.realbits - 2;
> +
> +       xfer->bits_per_word = bits_per_word;
> +
> +       xfer->len = (st->chip_info->num_channels - 1) * BITS_TO_BYTES(bits_per_word);

This needs to be based on storagebits, not realbits.

> +
> +       return bits_per_word;
> +}
> +

      parent reply	other threads:[~2024-05-06 21:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 14:55 [PATCH RFC v6 00/10] iio: adc: add new ad7380 driver Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 01/10] dt-bindings: iio: adc: Add binding for AD7380 ADCs Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 02/10] iio: adc: ad7380: new driver " Julien Stephan
2024-05-06 13:56   ` Jonathan Cameron
2024-05-01 14:55 ` [PATCH RFC v6 03/10] dt-bindings: iio: adc: ad7380: add pseudo-differential parts Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 04/10] iio: adc: ad7380: add support for " Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 05/10] iio: adc: ad7380: prepare for parts with more channels Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 06/10] dt-bindings: iio: adc: ad7380: add support for ad738x-4 4 channels variants Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 07/10] " Julien Stephan
2024-05-01 14:55 ` [PATCH RFC v6 08/10] iio: adc: ad7380: add oversampling support Julien Stephan
2024-05-06  8:20   ` Nuno Sá
2024-05-06 14:05   ` Jonathan Cameron
2024-05-01 14:55 ` [PATCH RFC v6 09/10] iio: adc: ad7380: add support for rolling average oversampling mode Julien Stephan
2024-05-06  8:33   ` Nuno Sá
2024-05-06 14:17   ` Jonathan Cameron
2024-05-06 15:04     ` David Lechner
2024-05-08 11:25       ` Jonathan Cameron
2024-05-09 22:01         ` David Lechner
2024-05-11 11:47           ` Jonathan Cameron
2024-05-01 14:55 ` [PATCH RFC v6 10/10] iio: adc: ad7380: add support for resolution boost Julien Stephan
2024-05-06  8:55   ` Nuno Sá
2024-05-06 13:46     ` Jonathan Cameron
2024-05-06 14:20       ` Jonathan Cameron
2024-05-06 14:44       ` David Lechner
2024-05-08 11:32         ` Jonathan Cameron
2024-05-06 15:09     ` David Lechner
2024-05-06 14:29   ` Jonathan Cameron
2024-05-06 21:45   ` David Lechner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMknhBEFdCMHt4-iDhNA2S3KpT=EYX53gDQjnQAu+Ph-gzO7GQ@mail.gmail.com' \
    --to=dlechner@baylibre.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=jstephan@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).