diff options
author | Mark Brown <broonie@kernel.org> | 2024-09-24 12:08:08 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-09-30 01:11:10 +0200 |
commit | caf78b0465053c23aa6211b9815dd5433766627d (patch) | |
tree | 9d43831280f65f35182e48389d43068758882bc5 | |
parent | 42afe80caff040525252af6e9601287777d144fe (diff) | |
download | lwn-caf78b0465053c23aa6211b9815dd5433766627d.tar.gz lwn-caf78b0465053c23aa6211b9815dd5433766627d.zip |
regcache: Improve documentation of available cache types
There is some user confusion about which cache types to choose when which
is not helped by the lack of any central documentation providing an
overview of what's available. Provide a short overview in the API header to
try to help reduce this.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240924-regcache-document-types-v1-1-e157054e1215@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | include/linux/regmap.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index f9ccad32fc5c..da07584284ab 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -54,7 +54,14 @@ struct sdw_slave; #define REGMAP_UPSHIFT(s) (-(s)) #define REGMAP_DOWNSHIFT(s) (s) -/* An enum of all the supported cache types */ +/* + * The supported cache types, the default is no cache. Any new caches + * should usually use the maple tree cache unless they specifically + * require that there are never any allocations at runtime and can't + * provide defaults in which case they should use the flat cache. The + * rbtree cache *may* have some performance advantage for very low end + * systems that make heavy use of cache syncs but is mainly legacy. + */ enum regcache_type { REGCACHE_NONE, REGCACHE_RBTREE, |