mfd: rohm: Convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Tue, 6 Feb 2024 07:13:07 +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>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20240206071314.8721-12-liubo03@inspur.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/rohm-bd71828.c
drivers/mfd/rohm-bd718x7.c
drivers/mfd/rohm-bd9576.c

index 594718f7e8e18ebcf7f0f9e9087166a29d11ea39..2f3826c7eef49b9970ba91e200b39cc7641b540c 100644 (file)
@@ -197,7 +197,7 @@ static const struct regmap_config bd71815_regmap = {
        .val_bits = 8,
        .volatile_table = &bd71815_volatile_regs,
        .max_register = BD71815_MAX_REGISTER - 1,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static const struct regmap_config bd71828_regmap = {
@@ -205,7 +205,7 @@ static const struct regmap_config bd71828_regmap = {
        .val_bits = 8,
        .volatile_table = &bd71828_volatile_regs,
        .max_register = BD71828_MAX_REGISTER,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 /*
index 4798bdf27afb6c16b20c3e8ba2efc2845e1392d1..7755a4c073bfeb1eaff6f4e6e50fbdb7caf2cf59 100644 (file)
@@ -87,7 +87,7 @@ static const struct regmap_config bd718xx_regmap_config = {
        .val_bits = 8,
        .volatile_table = &volatile_regs,
        .max_register = BD718XX_MAX_REGISTER - 1,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static int bd718xx_init_press_duration(struct regmap *regmap,
index bceac7016740db0a5a11530c6b78883fb177c247..3a9f61961721b07a8905d34bd2f139fbed060c22 100644 (file)
@@ -62,7 +62,7 @@ static struct regmap_config bd957x_regmap = {
        .val_bits = 8,
        .volatile_table = &volatile_regs,
        .max_register = BD957X_MAX_REGISTER,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static struct regmap_irq bd9576_irqs[] = {