Re: [RFC PATCH 1/2] regmap: Add cache_default_is_zero flag for flat cache
From: Mark Brown
Date: Wed Jan 07 2026 - 06:20:32 EST
On Wed, Jan 07, 2026 at 12:25:01PM +0530, Sheetal . wrote:
> On 06-01-2026 20:42, Mark Brown wrote:
> > Why do this on first read rather than than just fill the valid flags
> > during initialisation?
> Setting valid bits on first read rather than bitmap_fill() at init ensures:
> - Only accessed registers are marked valid
> - regcache_sync() only syncs registers that were actually used
> - Avoids writes to holes or unused registers during sync
> - Safer for drivers without writeable_reg callback
Seems reasonable, put that in the changelog please.
BTW I forgot in my initial review but please add KUnit coverage for
this, we've got good coverage of the cache code.
Attachment:
signature.asc
Description: PGP signature