diff options
author | Mark Brown <broonie@kernel.org> | 2023-06-11 14:06:07 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-12 15:51:06 +0200 |
commit | bfa0b38c148379c8a8c52e23bbdcb086414fb354 (patch) | |
tree | ef8df0512853d57cb658c71bbb09653f4d7c9e1c /drivers/base/regmap/regcache.c | |
parent | regmap: Merge up v6.4-rc6 (diff) | |
download | linux-bfa0b38c148379c8a8c52e23bbdcb086414fb354.tar.xz linux-bfa0b38c148379c8a8c52e23bbdcb086414fb354.zip |
regmap: maple: Implement block sync for the maple tree cache
For register maps where we can write multiple values in a single bus
operation it is generally much faster to do so. Improve the performance of
maple tree cache syncs on such devices by identifying blocks of adjacent
registers that need to be written out and combining them into a single
operation.
Combining writes does mean that we need to allocate a scratch buffer and
format the data into it but it is expected that for most cases where caches
are in use the cost of I/O will be much greater than the cost of doing the
allocation and format.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-regcache-maple-sync-raw-v1-1-8ddeb4e2b9ab@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 029564695dbb..c7d065f96a87 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -279,8 +279,8 @@ int regcache_write(struct regmap *map, return 0; } -static bool regcache_reg_needs_sync(struct regmap *map, unsigned int reg, - unsigned int val) +bool regcache_reg_needs_sync(struct regmap *map, unsigned int reg, + unsigned int val) { int ret; |