From: Bjorn Helgaas <helgaas@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v1] regmap: Clarify _regmap_update_bits() 'async' kernel-doc
Date: Fri, 17 Jul 2026 18:31:24 -0500 [thread overview]
Message-ID: <20260717233124.GA216954@bhelgaas> (raw)
In-Reply-To: <89cb2459-3d47-4ed6-8406-c6908320f791@sirena.org.uk>
On Fri, Jul 17, 2026 at 11:59:14PM +0100, Mark Brown wrote:
> On Fri, Jul 17, 2026 at 03:50:31PM -0500, Bjorn Helgaas wrote:
>
> > Reword it to clarify the read-modify-write mechanics: when 'async' is true,
> > the write is queued asynchronously, but the read will still be synchronous
> > unless the device uses a register cache.
>
> > - * If async is true:
> > - *
> > - * With most buses the read must be done synchronously so this is most useful
> > - * for devices with a cache which do not need to interact with the hardware to
> > - * determine the current register value.
> > + * If async is true, queue an asynchronous write. However, most buses
> > + * require synchronous reads, so the read-modify-write cycle will still
> > + * block on the read unless the device uses a register cache. Therefore,
> > + * this flag is most useful for cached devices, where the current value can
> > + * be read from memory without hardware I/O.
>
> That's... verbose. If you want to add a statement that async mode
> will be using async I/O then possibly I guess but there's a whole bunch
> more there.
The main problem is that the current text doesn't read well because
"if async is true" isn't connected to the rest.
There are three functions that take an "async" parameter, but two just
pass it on to regmap_update_bits_base(), so that seems like a
reasonable single place to say something about it.
Maybe something like this would be enough?
If async is true, queue an asynchronous write. However, reads are
synchronous on most buses, so they will still block unless the
device uses a register cache.
prev parent reply other threads:[~2026-07-17 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 20:50 Bjorn Helgaas
2026-07-17 22:59 ` Mark Brown
2026-07-17 23:31 ` Bjorn Helgaas [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=20260717233124.GA216954@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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
Powered by JetHome