regmap: kunit: Add cache-drop test with multiple cache blocks
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 8 Apr 2024 14:45:59 +0000 (15:45 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2024 15:38:14 +0000 (16:38 +0100)
commit468d277e6fb112e7a5e816ef5f1f6bd86c29bea6
tree8751a0c2f23835c61437737789a03f9796fefe96
parentd6f2fd7adcb5f25ac661808be9409f846b1de6fe
regmap: kunit: Add cache-drop test with multiple cache blocks

Add a test case for dropping only some cache blocks and leaving others
unchanged.

The regmap is divided into 8 register ranges, and only 4 of these are
written with values. This creates 4 non-contiguous ranges of registers
with cached values.

One whole range is then dropped, and part of another range. A cache
sync is then performed to check that the correct registers were written,
and the correct values were written to these registers.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240408144600.230848-11-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-kunit.c