summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-01-11 08:34:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-11 15:13:43 +0100
commit36e096eeed5cd1a5f0f8a0930cd5473d4bd5a699 (patch)
tree1cd42d954685af3a42d45248a382cf8e15b555ac /include/linux
parent8327cfa82d00dcd25300498f67bc4b90869a35f0 (diff)
downloadbarebox-36e096eeed5cd1a5f0f8a0930cd5473d4bd5a699.tar.gz
barebox-36e096eeed5cd1a5f0f8a0930cd5473d4bd5a699.tar.xz
regmap: clarify struct regmap::max_register value some more
We already have documentation for the member that was taken from Linux, but still managed to use it wrongly at multiple places that were recently fixed. To prevent such issues from reoccurring in the future, expand the documentation a bit. Suggested-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Acked-by: Robin van der Gracht <robin@protonic.nl> Link: https://lore.barebox.org/20240111073412.1318725-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 690dc3b1dc..9e38fbc12e 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -31,6 +31,9 @@ enum regmap_endian {
* data.
*
* @max_register: Optional, specifies the maximum valid register index.
+ * This must be a valid register address and thus a multiple
+ * of the register stride returned by regmap_get_reg_stride()
+ * after registration.
*
* @read_flag_mask: Mask to be set in the top byte of the register when doing
* a read.