Skip to contentSkip to conversation

mfd: maxim: Convert to use maple tree cache

PATCH Applied Mark Brown 4 participants 8 messages Sep 30, 2023 – Oct 5, 2023

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover mfd: maxim: Convert to use maple tree cache

The maple tree register cache is a more modern replacement for the rbtree cache, the data structure and surrounding implementation decisions are more modern. Convert the Maxim MFDs to use maple tree.

---
Mark Brown (3):
mfd: max77620: Convert to use maple tree register cache
mfd: max77686: Convert to use maple tree register cache
mfd: max8907: Convert to use maple tree register cache

 drivers/mfd/max77620.c | 6 +++---
 drivers/mfd/max77686.c | 2 +-
 drivers/mfd/max8907.c  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230929-mfd-maxim-maple-bb4f5c5a684a

Best regards,

Signature · 1 line
Mark Brown <[email protected]>
author
#1 lore raw

PATCH 1/3 mfd: max77620: Convert to use maple tree register cache

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.

---
 drivers/mfd/max77620.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/max77620.c +3 -3
index e63e8e47d908..74ef3f6d576c 100644
@@ -172,7 +172,7 @@ static const struct regmap_config max77620_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = MAX77620_REG_DVSSD4 + 1,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.rd_table = &max77620_readable_table,
 	.wr_table = &max77620_writable_table,
 	.volatile_table = &max77620_volatile_table,
@@ -184,7 +184,7 @@ static const struct regmap_config max20024_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = MAX20024_REG_MAX_ADD + 1,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.rd_table = &max20024_readable_table,
 	.wr_table = &max77620_writable_table,
 	.volatile_table = &max77620_volatile_table,
@@ -213,7 +213,7 @@ static const struct regmap_config max77663_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = MAX77620_REG_CID5 + 1,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.rd_table = &max77663_readable_table,
 	.wr_table = &max77663_writable_table,
 	.volatile_table = &max77620_volatile_table,
Signature · 1 line
2.39.2
author
#2 lore raw

PATCH 2/3 mfd: max77686: Convert to use maple tree register cache

In reply to Mark Brown

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.

---
 drivers/mfd/max77686.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/max77686.c +1 -1
index 91c286c4571c..0118a444a68b 100644
@@ -108,7 +108,7 @@ static const struct regmap_config max77802_regmap_config = {
 	.precious_reg = max77802_is_precious_reg,
 	.volatile_reg = max77802_is_volatile_reg,
 	.name = "max77802-pmic",
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static const struct regmap_irq max77686_irqs[] = {
Signature · 1 line
2.39.2
Reviewed-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] mfd: max77686: Convert to use maple tree register cache

Quoted 6 lines · Mark Brown

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.

---

Best regards,
Krzysztof

Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] mfd: max77686: Convert to use maple tree register cache

In reply to Mark Brown

Hi,

Quoted 15 lines · Mark Brown

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.

---
 drivers/mfd/max77686.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/max77686.c +0 -0
index 91c286c4571c..0118a444a68b 100644

drivers/mfd/max77686.c static const struct regmap_config max77802_regmap_config = { · line 114

Quoted 8 lines
drivers/mfd/max77686.c +1 -1
@@ -108,7 +108,7 @@ static const struct regmap_config max77802_regmap_config = {
 	.precious_reg = max77802_is_precious_reg,
 	.volatile_reg = max77802_is_volatile_reg,
 	.name = "max77802-pmic",
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static const struct regmap_irq max77686_irqs[] = {

Thanks.

Signature · 3 lines
Best Regards,
Samsung Electronics
Chanwoo Choi
author
#5 lore raw

PATCH 3/3 mfd: max8907: Convert to use maple tree register cache

In reply to Mark Brown

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.

---
 drivers/mfd/max8907.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max8907.c +2 -2
index 8bbe7979db91..accf426234b6 100644
@@ -63,7 +63,7 @@ static const struct regmap_config max8907_regmap_gen_config = {
 	.precious_reg = max8907_gen_is_precious_reg,
 	.writeable_reg = max8907_gen_is_writeable_reg,
 	.max_register = MAX8907_REG_LDO20VOUT,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static bool max8907_rtc_is_volatile_reg(struct device *dev, unsigned int reg)
@@ -108,7 +108,7 @@ static const struct regmap_config max8907_regmap_rtc_config = {
 	.precious_reg = max8907_rtc_is_precious_reg,
 	.writeable_reg = max8907_rtc_is_writeable_reg,
 	.max_register = MAX8907_REG_MPL_CNTL,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static const struct regmap_irq max8907_chg_irqs[] = {
Signature · 1 line
2.39.2
Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] mfd: max8907: Convert to use maple tree register cache

Quoted 6 lines · Mark Brown

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.

---

Best regards,
Krzysztof

maintainer Applied
#7 lore raw
In reply to Mark Brown
Quoted 5 lines · Mark Brown

The maple tree register cache is a more modern replacement for the rbtree cache, the data structure and surrounding implementation decisions are more modern. Convert the Maxim MFDs to use maple tree.

Applied, thanks!

[1/3] mfd: max77620: Convert to use maple tree register cache

      commit: 966f92187485bf43edd76b7c53781cafa20cf808
[2/3] mfd: max77686: Convert to use maple tree register cache
      commit: ce828b9f04ba338ed3a1fb8d5137a0a66973b479
[3/3] mfd: max8907: Convert to use maple tree register cache
      commit: 58704298aa29615108e2dd33f88b31ae38609096

--
Lee Jones [李琼斯]