Message ID | 20240206071314.8721-11-liubo03@inspur.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mfd: convert to use maple tree register cache | expand |
On Tue, Feb 06, 2024 at 02:13:06AM -0500, Bo Liu wrote: > 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> > --- > drivers/mfd/wm5102-tables.c | 2 +- > drivers/mfd/wm5110-tables.c | 2 +- > drivers/mfd/wm8350-regmap.c | 2 +- > drivers/mfd/wm8400-core.c | 2 +- > drivers/mfd/wm97xx-core.c | 6 +++--- > 5 files changed, 7 insertions(+), 7 deletions(-) The change looks good, but whilst it won't cause any problems, it seems a bit weird not to convert wm8997, wm8998 and cs47l24. These are part of the same driver as wm5102 and wm5110. Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Thanks, Charles
On Tue, Feb 06, 2024 at 10:04:07AM +0000, Charles Keepax wrote: > On Tue, Feb 06, 2024 at 02:13:06AM -0500, Bo Liu wrote: > > drivers/mfd/wm5102-tables.c | 2 +- > > drivers/mfd/wm5110-tables.c | 2 +- > > drivers/mfd/wm8350-regmap.c | 2 +- > > drivers/mfd/wm8400-core.c | 2 +- > > drivers/mfd/wm97xx-core.c | 6 +++--- > > seems a bit weird not to convert wm8997, wm8998 and cs47l24. > These are part of the same driver as wm5102 and wm5110. Nevermind, it seems those parts were already converted. Thanks, Charles
diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c index f77ecc635b6f..6a8602c1c4ee 100644 --- a/drivers/mfd/wm5102-tables.c +++ b/drivers/mfd/wm5102-tables.c @@ -1922,7 +1922,7 @@ const struct regmap_config wm5102_spi_regmap = { .readable_reg = wm5102_readable_register, .volatile_reg = wm5102_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5102_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5102_reg_default), }; diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c index eba324875afd..6ff33a54a068 100644 --- a/drivers/mfd/wm5110-tables.c +++ b/drivers/mfd/wm5110-tables.c @@ -3202,7 +3202,7 @@ const struct regmap_config wm5110_spi_regmap = { .readable_reg = wm5110_readable_register, .volatile_reg = wm5110_volatile_register, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm5110_reg_default, .num_reg_defaults = ARRAY_SIZE(wm5110_reg_default), }; diff --git a/drivers/mfd/wm8350-regmap.c b/drivers/mfd/wm8350-regmap.c index 5663b8b0b3ad..3d0ebb004dbf 100644 --- a/drivers/mfd/wm8350-regmap.c +++ b/drivers/mfd/wm8350-regmap.c @@ -325,7 +325,7 @@ const struct regmap_config wm8350_regmap = { .reg_bits = 8, .val_bits = 16, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .max_register = WM8350_MAX_REGISTER, .readable_reg = wm8350_readable, diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index 75483c9be0c4..ddfb234849dd 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c @@ -100,7 +100,7 @@ static const struct regmap_config wm8400_regmap_config = { .volatile_reg = wm8400_volatile, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, }; /** diff --git a/drivers/mfd/wm97xx-core.c b/drivers/mfd/wm97xx-core.c index 663acbb1854c..1566a9b04b6a 100644 --- a/drivers/mfd/wm97xx-core.c +++ b/drivers/mfd/wm97xx-core.c @@ -95,7 +95,7 @@ static const struct regmap_config wm9705_regmap_config = { .reg_stride = 2, .val_bits = 16, .max_register = 0x7e, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm9705_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm9705_reg_defaults), @@ -163,7 +163,7 @@ static const struct regmap_config wm9712_regmap_config = { .reg_stride = 2, .val_bits = 16, .max_register = 0x7e, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm9712_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm9712_reg_defaults), @@ -234,7 +234,7 @@ static const struct regmap_config wm9713_regmap_config = { .reg_stride = 2, .val_bits = 16, .max_register = 0x7e, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_MAPLE, .reg_defaults = wm9713_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm9713_reg_defaults),
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> --- drivers/mfd/wm5102-tables.c | 2 +- drivers/mfd/wm5110-tables.c | 2 +- drivers/mfd/wm8350-regmap.c | 2 +- drivers/mfd/wm8400-core.c | 2 +- drivers/mfd/wm97xx-core.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-)