Skip to content

Commit caf78b0

Browse files
committed
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 42afe80 commit caf78b0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/linux/regmap.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ struct sdw_slave;
5454
#define REGMAP_UPSHIFT(s) (-(s))
5555
#define REGMAP_DOWNSHIFT(s) (s)
5656

57-
/* An enum of all the supported cache types */
57+
/*
58+
* The supported cache types, the default is no cache. Any new caches
59+
* should usually use the maple tree cache unless they specifically
60+
* require that there are never any allocations at runtime and can't
61+
* provide defaults in which case they should use the flat cache. The
62+
* rbtree cache *may* have some performance advantage for very low end
63+
* systems that make heavy use of cache syncs but is mainly legacy.
64+
*/
5865
enum regcache_type {
5966
REGCACHE_NONE,
6067
REGCACHE_RBTREE,

0 commit comments

Comments
 (0)