Commit 8baebfc2 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Mark Brown

regmap: add helper for per-port regfield initialization

Similar to the standalone regfields, add an initializer for the users
who need to set .id_size and .id_offset in order to use the
regmap_fields_update_bits_base API.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20200527234113.2491988-2-olteanv@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8f3d9f35
...@@ -1134,6 +1134,14 @@ struct reg_field { ...@@ -1134,6 +1134,14 @@ struct reg_field {
.msb = _msb, \ .msb = _msb, \
} }
#define REG_FIELD_ID(_reg, _lsb, _msb, _size, _offset) { \
.reg = _reg, \
.lsb = _lsb, \
.msb = _msb, \
.id_size = _size, \
.id_offset = _offset, \
}
struct regmap_field *regmap_field_alloc(struct regmap *regmap, struct regmap_field *regmap_field_alloc(struct regmap *regmap,
struct reg_field reg_field); struct reg_field reg_field);
void regmap_field_free(struct regmap_field *field); void regmap_field_free(struct regmap_field *field);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment