* [PATCH v2] regmap: Clarify regmap_update_bits_base() 'async' kernel-doc
@ 2026-07-21 15:49 Bjorn Helgaas
2026-07-21 16:18 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2026-07-21 15:49 UTC (permalink / raw)
To: Mark Brown
Cc: Kuninori Morimoto, Greg Kroah-Hartman, Rafael J . Wysocki,
Danilo Krummrich, driver-core, linux-kernel, Bjorn Helgaas
The kernel-doc for the regmap_update_bits_base() 'async' parameter didn't
actually say what it does.
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.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
Changes since v1:
- Shorten doc, mention the correct function in subject
v1: https://lore.kernel.org/all/20260717205031.197980-1-bhelgaas@google.com
drivers/base/regmap/regmap.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index e6e022b02637..d0deddec516f 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -3296,11 +3296,9 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
* Perform a read/modify/write cycle on a register map with change, async, force
* options.
*
- * 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, reads are
+ * synchronous on most buses, so they will still block unless the device
+ * uses a register cache.
*
* Returns zero for success, a negative number on error.
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] regmap: Clarify regmap_update_bits_base() 'async' kernel-doc
2026-07-21 15:49 [PATCH v2] regmap: Clarify regmap_update_bits_base() 'async' kernel-doc Bjorn Helgaas
@ 2026-07-21 16:18 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-07-21 16:18 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Kuninori Morimoto, Greg Kroah-Hartman, Rafael J . Wysocki,
Danilo Krummrich, driver-core, linux-kernel, Bjorn Helgaas
[-- Attachment #1: Type: text/plain, Size: 651 bytes --]
On Tue, Jul 21, 2026 at 10:49:02AM -0500, Bjorn Helgaas wrote:
> The kernel-doc for the regmap_update_bits_base() 'async' parameter didn't
> actually say what it does.
It does?
> 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.
The API here is that we'll use async as much as is supported, there are
actually some buses that have a read/modify/write operation in the
protocol so if one of them supported async I/O we could use it here
(we'd need to plumb that through, but the users shouldn't care).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-21 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 15:49 [PATCH v2] regmap: Clarify regmap_update_bits_base() 'async' kernel-doc Bjorn Helgaas
2026-07-21 16:18 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox