From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"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: ti-ads7950: use spi_optimize_message()
Date: Tue, 14 Apr 2026 12:54:19 +0300 [thread overview]
Message-ID: <ad4OywqHDC7aYapD@ashevche-desk.local> (raw)
In-Reply-To: <20260411-iio-adc-ti-ads7950-spi-optimize-msg-v1-1-617766ef2e38@baylibre.com>
On Sat, Apr 11, 2026 at 05:13:33PM -0500, David Lechner wrote:
> Use spi_optimize_message() to reduce CPU usage during buffered reads.
>
> On hardware with support for SPI_CS_WORD, this reduced the CPU usage
> of the threaded interrupt by about 5%. On hardware without support, this
> should reduce CPU usage even more since it won't have to split the SPI
> transfers each time the interrupt handler is called.
>
> The update_scan_mode callback hand to be moved to the buffer preenable
> callback since the SPI transfer mode can't be changed after
> spi_optimize_message() has been called. (The buffer postenable callback
> can't be used because it happens after the trigger is enabled, so the
> SPI message needs to be optimized before that.)
>
> The indent of ti_ads7950_read_raw is changed since there is no longer
> anything else in the struct to align with since we removed
> ti_ads7950_update_scan_mode.
Some of the func() are mentioned w/o parentheses and I got lost which one is
which. Also callbacks usually mentioned as .callback() (with a leading dot).
The second paragraph doesn't tell me clearly if there is a behaviour change
from user perspective.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-04-14 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 22:13 [PATCH] iio: adc: ti-ads7950: use spi_optimize_message() David Lechner
2026-04-14 9:54 ` Andy Shevchenko [this message]
2026-04-14 13:29 ` David Lechner
2026-04-14 16:31 ` Andy Shevchenko
2026-04-14 17:52 ` David Lechner
2026-04-20 13:03 ` Jonathan Cameron
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=ad4OywqHDC7aYapD@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--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