mfd: lochnagar-i2c: Convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Tue, 6 Feb 2024 07:13:05 +0000 (02:13 -0500)
committerLee Jones <lee@kernel.org>
Fri, 23 Feb 2024 14:58:04 +0000 (14:58 +0000)
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240206071314.8721-10-liubo03@inspur.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/lochnagar-i2c.c

index 0b76fcccd0bda714d3bc1a2e6e2a3adef8d72d84..6c930c57f2e23a0408aefe67c75c8183b5c88352 100644 (file)
@@ -70,7 +70,7 @@ static const struct regmap_config lochnagar1_i2c_regmap = {
        .use_single_read = true,
        .use_single_write = true,
 
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static const struct reg_sequence lochnagar1_patch[] = {
@@ -163,7 +163,7 @@ static const struct regmap_config lochnagar2_i2c_regmap = {
        .readable_reg = lochnagar2_readable_register,
        .volatile_reg = lochnagar2_volatile_register,
 
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static const struct reg_sequence lochnagar2_patch[] = {