Skip to content
Verified Commit 7903d15f authored by Richard Fitzgerald's avatar Richard Fitzgerald Committed by Mark Brown
Browse files

regmap: kunit: Add more cache-sync tests



Extend the testing of cache-sync.

- cache_sync() renamed cache_sync_marked_dirty() for clarity of
  what conditions it is testing.

- cache_sync_defaults() renamed cache_sync_defaults_marked_dirty()
  for clarity. Added code to write the register back to its default
  value to check that a dirty sync doesn't write out the default value.

- Added cache_sync_after_cache_only(). Tests syncing the cache without
  calling regcache_mark_dirty(). A register written while in cache-only
  should be written out by regcache_sync().

- Added cache_sync_default_after_cache_only. This is similar to
  cache_sync_after_cache_only(), but the register is changed to its
  default value while in cache-only. Because regcache_mark_dirty() was
  NOT called, regacache_sync() should write out the register.

Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240408144600.230848-8-rf@opensource.cirrus.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7dd52d30
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment