regmap: ram: support noinc semantics
authorBen Wolsieffer <ben.wolsieffer@hefring.com>
Thu, 2 Nov 2023 20:30:38 +0000 (16:30 -0400)
committerMark Brown <broonie@kernel.org>
Mon, 13 Nov 2023 01:26:17 +0000 (01:26 +0000)
commit02e3564a344064aca49f147e8a4eecbe5d3459fc
tree9892b343d3ef087b3d1f9e20ef7ce008c6f5f6c6
parentb85ea95d086471afb4ad062012a4d73cd328fa86
regmap: ram: support noinc semantics

Support noinc semantics in RAM backed regmaps, for testing purposes. Add
a new callback that selects registers which should have noinc behavior.
Bulk writes to a noinc register will cause the last value in the buffer
to be assigned to the register, while bulk reads will copy the same
value repeatedly into the buffer.

This patch only adds support to regmap-raw-ram, since regmap-ram does
not support bulk operations.

Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
Link: https://lore.kernel.org/r/20231102203039.3069305-1-ben.wolsieffer@hefring.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap-raw-ram.c