Re: [RFC] regmap: allow volatile register writes with cached only read maps
From: Mark Brown
Date: Thu May 10 2018 - 22:01:04 EST
On Wed, May 09, 2018 at 01:49:21PM +0200, Jorge Ramirez-Ortiz wrote:
> On 05/09/2018 10:39 AM, Mark Brown wrote:
> > I don't understand what voltile access means for write only devices.
> > Volatile means that we don't read the cache but go direct to the
> > hardware so if we can't read the hardware that's pretty redundant, a
> > volatile read that goes to the cache is just a default read.
> 1. only cached reads: (as a consequence every regmap write must succeed).
> 2. cached writes: do not access the hardware unless the value differs from
> what is in the cache already or (3) applies.
> 3. support for selectable volatile writes: those that will always access the
> device no matter what the cache holds.
We don't currently suppress writes except when regmap_update_bits()
notices that the modification was a noop. You probably want to be using
regmap_write_bits() here instead of regmap_update_bits(), that will
always do the write.
Attachment:
signature.asc
Description: PGP signature