regmap_[set|clear]_bits() are useful shortcuts to regmap_update_bits(). Implement them. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- include/regmap.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/regmap.h b/include/regmap.h index db84c7a534..4b30c21776 100644 --- a/include/regmap.h +++ b/include/regmap.h @@ -130,6 +130,18 @@ int regmap_write_bits(struct regmap *map, unsigned int reg, int regmap_update_bits(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val); +static inline int regmap_set_bits(struct regmap *map, + unsigned int reg, unsigned int bits) +{ + return regmap_update_bits(map, reg, bits, bits); +} + +static inline int regmap_clear_bits(struct regmap *map, + unsigned int reg, unsigned int bits) +{ + return regmap_update_bits(map, reg, bits, 0); +} + /** * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs * -- 2.30.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox