]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: da9121: convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Wed, 20 Mar 2024 08:57:28 +0000 (04:57 -0400)
committerMark Brown <broonie@kernel.org>
Mon, 25 Mar 2024 00:48:16 +0000 (00:48 +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>
Link: https://msgid.link/r/20240320085740.4604-2-liubo03@inspur.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9121-regulator.c

index 5ee76b533576035e5acae3d053b479403cd356e0..96257551bb128a03c9c74af3d28412244f9eabfe 100644 (file)
@@ -872,7 +872,7 @@ static struct regmap_config da9121_1ch_regmap_config = {
        .rd_table = &da9121_1ch_readable_table,
        .wr_table = &da9121_1ch_writeable_table,
        .volatile_table = &da9121_volatile_table,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 /* DA9121 regmap config for 2 channel variants */
@@ -883,7 +883,7 @@ static struct regmap_config da9121_2ch_regmap_config = {
        .rd_table = &da9121_2ch_readable_table,
        .wr_table = &da9121_2ch_writeable_table,
        .volatile_table = &da9121_volatile_table,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 
 static int da9121_check_device_type(struct i2c_client *i2c, struct da9121 *chip)