mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] regmap: clarify struct regmap::max_register value some more
@ 2024-01-11  7:34 Ahmad Fatoum
  2024-01-11  8:12 ` Robin van der Gracht
  2024-01-11 14:14 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2024-01-11  7:34 UTC (permalink / raw)
  To: barebox; +Cc: Robin van der Gracht, Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regmap: clarify struct regmap::max_register value some more
  2024-01-11  7:34 [PATCH] regmap: clarify struct regmap::max_register value some more Ahmad Fatoum
@ 2024-01-11  8:12 ` Robin van der Gracht
  2024-01-11 14:14 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Robin van der Gracht @ 2024-01-11  8:12 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Thanks!

Acked-by: Robin van der Gracht <robin@protonic.nl>

On Thu, 11 Jan 2024 08:34:12 +0100
Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:

> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regmap: clarify struct regmap::max_register value some more
  2024-01-11  7:34 [PATCH] regmap: clarify struct regmap::max_register value some more Ahmad Fatoum
  2024-01-11  8:12 ` Robin van der Gracht
@ 2024-01-11 14:14 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2024-01-11 14:14 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum; +Cc: Robin van der Gracht


On Thu, 11 Jan 2024 08:34:12 +0100, Ahmad Fatoum wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] regmap: clarify struct regmap::max_register value some more
      commit: 36e096eeed5cd1a5f0f8a0930cd5473d4bd5a699

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-11 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11  7:34 [PATCH] regmap: clarify struct regmap::max_register value some more Ahmad Fatoum
2024-01-11  8:12 ` Robin van der Gracht
2024-01-11 14:14 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox