From: David Lechner <dlechner@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7124: fix sample rate for multi-channel use
Date: Thu, 4 Sep 2025 09:15:19 -0500 [thread overview]
Message-ID: <0a64efe5-9b07-4188-be30-54f268e862bf@baylibre.com> (raw)
In-Reply-To: <20250901165751.305d0a68@jic23-huawei>
On 9/1/25 10:57 AM, Jonathan Cameron wrote:
> On Thu, 28 Aug 2025 11:42:28 -0500
> David Lechner <dlechner@baylibre.com> wrote:
...
>> @@ -261,8 +263,12 @@ static void ad7124_set_channel_odr(struct ad7124_state *st, unsigned int channel
>> * fCLK is the master clock frequency
>> * FS[10:0] are the bits in the filter register
>> * FS[10:0] can have a value from 1 to 2047
>> + * When multiple channels in the sequencer or the SINGLE_CYCLE bit is
> This sentence doesn't read. Maybe something with a few more words like.
>
> * When multiple channels are enabled in the sequencer, the
> * SINGLE_CYCLE bit is set or when certain filter modes are enabled,...
>
>> + * or when certain filter modes are enabled, there is an extra factor
>> + * of (4 + AVG - 1) to allow for settling time.
* When multiple channels are enabled in the sequencer, the SINGLE_CYCLE
* bit is set, or when a fast settling filter mode is enabled on any
* channel, there is an extra factor of (4 + AVG - 1) to allow for
* settling time. We ensure that at least one of these is always true so
* that we always use the same factor.
>> */
>> - odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * 32);
>> + factor = 32 * (4 + avg - 1);
>> + odr_sel_bits = DIV_ROUND_CLOSEST(fclk, odr * factor);
>
>
prev parent reply other threads:[~2025-09-04 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 16:42 [PATCH] iio: adc: ad7124: fix sample rate for multi-channel use David Lechner
2025-09-01 15:57 ` Jonathan Cameron
2025-09-04 14:15 ` 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=0a64efe5-9b07-4188-be30-54f268e862bf@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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