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

From: Mark Brown
Date: Thu Nov 04 2021 - 10:50:44 EST


On Wed, Nov 03, 2021 at 10:53:17PM +0100, Ansuel Smith wrote:
> On Wed, Nov 03, 2021 at 09:29:11PM +0000, Mark Brown wrote:

> > > > 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.

> I think I'm missing something. The user case is a driver that
> have CACHE DISABLED. The !map->bus check is added just to limit this to
> a no bus configuration not to permit this with CACHE enabled. The limit
> I was referring was in the init function where the update_bits is
> assigned to the map. I honestly didn't notice that anything with cache
> disabled was flagged as volatile.

In what way would the presence or absence of a bus be relevant to a
decision about being able to safely use an _update_bits() operation?

> So the rest of the changes permit to declare a update_bits function
> for a no bus configuration is good?

Probably, I'd need to look again.

Attachment: signature.asc
Description: PGP signature