Skip to content
Snippets Groups Projects
Commit e936397a authored by Mario Six's avatar Mario Six Committed by Simon Glass
Browse files

regmap: Define regmap_{get,set}


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: default avatarAnatolij Gustschin <agust@denx.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
parent d5c7bd98
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment