Re: [PATCH] regmap: allow to define reg_update_bits for no bus configuration

From: Mark Brown
Date: Wed Nov 03 2021 - 13:01:25 EST


On Tue, Nov 02, 2021 at 10:41:38PM +0100, Ansuel Smith wrote:

> @@ -3064,7 +3065,7 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
> if (change)
> *change = false;
>
> - if (regmap_volatile(map, reg) && map->reg_update_bits) {
> + if ((regmap_volatile(map, reg) || !map->bus) && map->reg_update_bits) {
> ret = map->reg_update_bits(map->bus_context, reg, mask, val);
> if (ret == 0 && change)
> *change = true;

I don't understand this change. The point of the check for volatile
there is that if the register isn't volatile then we need to ensure that
the cache gets updated with any change that happens so we need to go
through paths that include cache updates. The presence or otherwise of
a bus does not seem at all relevant here.

Attachment: signature.asc
Description: PGP signature