This is a simple wrapper around set/clear bits used by drivers in Linux.
Add it here so it can be used by Qualcomm CCF clk drivers.
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
return regmap_update_bits(map, offset, bits, 0);
}
+static inline int regmap_assign_bits(struct regmap *map, unsigned int reg,
+ unsigned int bits, bool value)
+{
+ if (value)
+ return regmap_set_bits(map, reg, bits);
+ else
+ return regmap_clear_bits(map, reg, bits);
+}
+
/**
* regmap_init_mem() - Set up a new register map that uses memory access
*