Re: [PATCH] tty: max310x: work around regmap->regcache data corruption

From: Mark Brown
Date: Fri Dec 01 2023 - 16:41:58 EST


On Fri, Dec 01, 2023 at 04:38:46PM -0500, Hugo Villeneuve wrote:
> Mark Brown <broonie@xxxxxxxxxx> wrote:

> > If you're working on that driver it'd also be good to update the current
> > use of cache bypass for the enhanced features/interrupt identification
> > register (and anything else in there, that did seem to be the only one)
> > to use regmap ranges instead - that'd remove the need for the efr_lock
> > and be a much more sensible/idiomatic use of the regmap APIs.

> I will also look to remove the efr_lock, altough it has more
> implications since this ship has some registers that share a common
> address, and selected by bits in other registers, and I think this
> is why there is this efr_lock.

Right, the registers sharing a common address with the register selected
by bits in another register is what regmap ranges support - the less
creative use of this is banked blocks of registers with a selector
register which picks which page bank is in use, that's moderately common
especially for TI.

Attachment: signature.asc
Description: PGP signature