From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Francesco Lavra <flavra@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Ramona Gradinariu" <ramona.gradinariu@analog.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.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 v2 2/2] iio: accel: adxl380: Optimize reading of FIFO entries in interrupt handler
Date: Fri, 23 Jan 2026 13:12:10 +0200 [thread overview]
Message-ID: <aXNXigqkSL6L1Jr0@smile.fi.intel.com> (raw)
In-Reply-To: <34d7983a594b40d6d98dce02c1cff843f689a275.camel@baylibre.com>
On Fri, Jan 23, 2026 at 12:09:36PM +0100, Francesco Lavra wrote:
> On Fri, 2026-01-23 at 09:54 +0000, Jonathan Cameron wrote:
> > On Fri, 23 Jan 2026 10:13:16 +0200
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > On Thu, Jan 22, 2026 at 07:53:13PM +0000, Jonathan Cameron wrote:
> > > > On Mon, 19 Jan 2026 11:23:17 +0100
> > > > Francesco Lavra <flavra@baylibre.com> wrote:
> > > >
> > > > > In order to minimize the time required for transferring FIFO data
> > > > > from the
> > > > > sensor to the host machine, perform the read from the FIFO in a
> > > > > single call
> > > > > to regmap_bulk_read().
> > >
> > > > It's a call to regmap_noinc_read() not regmap_bulk_read()
> > > > I'll fix it.
> > >
> > > This is interesting, does it mean the patch was never tested on the
> > > real HW?
>
> The driver has been tested (by me) on real hardware, both before and after
> this patch.
>
> > > Or maybe noninc is intentional?
> > >
> > It's absolutely intentional. The device presents a single register
> > address
> > that has the fifo behind it (which is what we added noinc for years ago).
> > So patch should definitely work. Goes from reading that register N times
> > in
> > each call within a loop of M to reading it N x M.
> >
> > If regcache is in use this makes a difference as avoids corrupting
> > registers
> > after this point as the address increment expected in the hardware for
> > a bulk read doesn't happen. Without regcache it's just "documentation"
> > as
> > at least for protocols used here its the same as a bulk read on the bus.
> >
> > So patch is fine, it just mentioned the wrong call in the description
> > I'd guess this is because someone is working with a tree that has the
> > wrong call in
> > it but might be wrong.
>
> I have this patch applied also to older kernel versions where
> regmap_noinc_read() doesn't exist, so this is just a copy-paste error in
> the commit message. Sorry about that.
Thanks for clarifying this!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-01-23 11:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 10:23 [PATCH v2 0/2] accel: adxl380: Improve data reading from FIFO Francesco Lavra
2026-01-19 10:23 ` [PATCH v2 1/2] iio: accel: adxl380: Avoid reading more entries than present in FIFO Francesco Lavra
2026-01-19 10:23 ` [PATCH v2 2/2] iio: accel: adxl380: Optimize reading of FIFO entries in interrupt handler Francesco Lavra
2026-01-22 19:53 ` Jonathan Cameron
2026-01-23 8:13 ` Andy Shevchenko
2026-01-23 9:54 ` Jonathan Cameron
2026-01-23 11:09 ` Francesco Lavra
2026-01-23 11:12 ` Andy Shevchenko [this message]
2026-01-22 19:54 ` [PATCH v2 0/2] accel: adxl380: Improve data reading from FIFO 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=aXNXigqkSL6L1Jr0@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=flavra@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=ramona.gradinariu@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