30 Jul
2019
30 Jul
'19
4:18 p.m.
On Tue, Jul 30, 2019 at 03:04:19PM +0100, Thomas Preston wrote:
On 30/07/2019 13:41, Charles Keepax wrote:
+static int tda7802_bulk_update(struct regmap *map, struct reg_update *update,
size_t update_count)
+{
- int i, err;
- for (i = 0; i < update_count; i++) {
err = regmap_update_bits(map, update[i].reg, update[i].mask,
update[i].val);
if (err < 0)
return err;
- }
- return i;
+}
This could probably be removed using regmap_multi_reg_write.
The problem is that I want to retain the state of the other bits in those registers. Maybe I should make a copy of the backed up state, set the bits I want to off-device, then either:
- Write the changes with regmap_multi_reg_write
- Write all six regs again (if my device doesn't support the multi_reg)
Nah sorry my bad you are probably better off they way you are.
Thanks, Charles