Skip to contentSkip to conversation

mfd: bd96801: Use maple tree register cache

PATCH Applied Mark Brown 3 participants 4 messages Sep 24, 2024 – Oct 9, 2024

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: bd96801: Use maple tree register cache

The maple tree register cache uses a more modern data structure than the rbtree cache and makes implementation decisions more suited to modern hardware, switch the bd96801 driver to it to take advantage of this newer code. No functional changes.

---
 drivers/mfd/rohm-bd96801.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rohm-bd96801.c +1 -1
index 714f08ed544b..f118e63d9b7d 100644
@@ -194,7 +194,7 @@ static const struct regmap_config bd96801_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.volatile_table = &volatile_regs,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static int bd96801_i2c_probe(struct i2c_client *i2c)

---
base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652
change-id: 20240924-mfd-bd96801-maple-cc2e58f891b5

Best regards,

Signature · 1 line
Mark Brown <[email protected]>
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Mark,

Quoted 6 lines · Mark Brown

The maple tree register cache uses a more modern data structure than the rbtree cache and makes implementation decisions more suited to modern hardware, switch the bd96801 driver to it to take advantage of this newer code. No functional changes.

Thanks! So, I should have used maple tree with regmap instead of the rbtree when sending this... Do you know, is there any occasion where the rbtree would be better?

As a unrelated thing - seems like you've made it safely back from the LPC. It was nice finally meeting you :)

Yours,
-- Matti

Signature · 5 lines
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
author
#2 lore raw
Quoted 3 lines · Matti Vaittinen

Thanks! So, I should have used maple tree with regmap instead of the rbtree when sending this... Do you know, is there any occasion where the rbtree would be better?

rbtree stores in device native format so large syncs might be more efficient, we can just send directly from the buffer. This could be a good tradeoff for larger syncs running on slower CPUs but it's probably pretty marginal.

Quoted 2 lines

As a unrelated thing - seems like you've made it safely back from the LPC. It was nice finally meeting you :)

Actually in Paris for Kernel Recipies so not quite but yes, good to meet you!

maintainer Applied
#3 lore raw

Re: (subset) [PATCH] mfd: bd96801: Use maple tree register cache

In reply to Mark Brown
Quoted 6 lines · Mark Brown

The maple tree register cache uses a more modern data structure than the rbtree cache and makes implementation decisions more suited to modern hardware, switch the bd96801 driver to it to take advantage of this newer code. No functional changes.

Applied, thanks!

[1/1] mfd: bd96801: Use maple tree register cache

      commit: f8e7a05154d0fe3e977e1cbfdc43657cebd560ef

--
Lee Jones [李琼斯]