[U-Boot] [PATCH v11 10/16] regmap: Define regmap_{get,set}
sjg at google.com
sjg at google.com
Wed Oct 24 17:35:33 UTC 2018
It would be convenient if one could use the regmap API in conjunction
with register maps defined as structs (i.e. structs that directly mirror
the memory layout of the registers in question). A similar approach was
planned with the regmap_write32/regmap_read32 macros, but was never
used.
Hence, implement regmap_set/regmap_range_set and
regmap_get/regmap_range_get macros, which, given a register map, a
struct describing the layout of the register map, and a member name
automatically produce regmap_read/regmap_write calls that access the
specified member in the register map.
Reviewed-by: Anatolij Gustschin <agust at denx.de>
Reviewed-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Mario Six <mario.six at gdsys.cc>
---
v10 -> v11:
No changes
v9 -> v10:
No changes
v8 -> v9:
No changes
v7 -> v8:
No changes
v6 -> v7:
No changes
v5 -> v6:
No changes
v4 -> v5:
No changes
v3 -> v4:
No changes
v2 -> v3:
* Fixed style violations
* Added documentation
v1 -> v2:
New in v2
---
include/regmap.h | 54 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 50 insertions(+), 4 deletions(-)
Applied to u-boot-dm/next, thanks!
More information about the U-Boot
mailing list