mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Robin van der Gracht <robin@protonic.nl>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] regmap: clarify struct regmap::max_register value some more
Date: Thu, 11 Jan 2024 08:34:12 +0100	[thread overview]
Message-ID: <20240111073412.1318725-1-a.fatoum@pengutronix.de> (raw)

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>
---
 include/linux/regmap.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 690dc3b1dccb..9e38fbc12e16 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.
-- 
2.39.2




             reply	other threads:[~2024-01-11  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  7:34 Ahmad Fatoum [this message]
2024-01-11  8:12 ` Robin van der Gracht
2024-01-11 14:14 ` Sascha Hauer

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=20240111073412.1318725-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robin@protonic.nl \
    /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