Skip to contentSkip to conversation

leds: Convert to use maple tree register cache

PATCH Applied Mark Brown 2 participants 6 messages Sep 29, 2023 – Oct 5, 2023

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover leds: Convert to use maple tree register cache

The maple tree register cache is a more modern replacement for the rbtree cache, the underlying data structure is more modern and the surrounding cache implementation makes a number of choices which are more suited to modern systems than those made by rbtree. This series updates the LED drivers that use the rbtree cache to use the maple tree cache.

---
Mark Brown (4):
leds: lm3601x: Convert to use maple tree register cache
leds: aw200xx: Convert to use maple tree register cache
leds: lm392x: Convert to use maple tree register cache
leds: lp3952: Convert to use maple tree register cache

 drivers/leds/flash/leds-lm3601x.c | 2 +-
 drivers/leds/leds-aw200xx.c       | 2 +-
 drivers/leds/leds-lm3692x.c       | 2 +-
 drivers/leds/leds-lp3952.c        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230929-leds-maple-746230bd3ab6

Best regards,

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

PATCH 1/4 leds: lm3601x: 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/leds/flash/leds-lm3601x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/flash/leds-lm3601x.c +1 -1
index b6c524facf49..8191be0ef0c6 100644
@@ -123,7 +123,7 @@ static const struct regmap_config lm3601x_regmap = {
 	.max_register = LM3601X_DEV_ID_REG,
 	.reg_defaults = lm3601x_regmap_defs,
 	.num_reg_defaults = ARRAY_SIZE(lm3601x_regmap_defs),
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.volatile_reg = lm3601x_volatile_reg,
 };
 
Signature · 1 line
2.39.2
author
#2 lore raw

PATCH 2/4 leds: aw200xx: 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/leds/leds-aw200xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-aw200xx.c +1 -1
index 691a743cc9b0..bec846272398 100644
@@ -479,7 +479,7 @@ static const struct regmap_config aw200xx_regmap_config = {
 	.num_ranges = ARRAY_SIZE(aw200xx_ranges),
 	.rd_table = &aw200xx_readable_table,
 	.wr_table = &aw200xx_writeable_table,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static int aw200xx_probe(struct i2c_client *client)
Signature · 1 line
2.39.2
author
#3 lore raw

PATCH 3/4 leds: lm392x: 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/leds/leds-lm3692x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-lm3692x.c +1 -1
index f8ad61e47a19..c319ff4d70b2 100644
@@ -139,7 +139,7 @@ static const struct regmap_config lm3692x_regmap_config = {
 	.max_register = LM3692X_FAULT_FLAGS,
 	.reg_defaults = lm3692x_reg_defs,
 	.num_reg_defaults = ARRAY_SIZE(lm3692x_reg_defs),
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static int lm3692x_fault_check(struct lm3692x_led *led)
Signature · 1 line
2.39.2
author
#4 lore raw

PATCH 4/4 leds: lp3952: 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/leds/leds-lp3952.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-lp3952.c +1 -1
index 3bd55652a706..9e6a3d300b2f 100644
@@ -204,7 +204,7 @@ static const struct regmap_config lp3952_regmap = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = REG_MAX,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static int lp3952_probe(struct i2c_client *client)
Signature · 1 line
2.39.2
maintainer Applied
#5 lore raw
In reply to Mark Brown
Quoted 8 lines · Mark Brown

The maple tree register cache is a more modern replacement for the rbtree cache, the underlying data structure is more modern and the surrounding cache implementation makes a number of choices which are more suited to modern systems than those made by rbtree. This series updates the LED drivers that use the rbtree cache to use the maple tree cache.

[...]

Applied, thanks!

[1/4] leds: lm3601x: Convert to use maple tree register cache

      commit: c2b7575239f5d0925035f3fc3bb155d176abee80
[2/4] leds: aw200xx: Convert to use maple tree register cache
      commit: 2aedfe62b4151b0abe35bf022edf18f84817afcd
[3/4] leds: lm392x: Convert to use maple tree register cache
      commit: c2ecac98222a23ad8209a71ad5c1e32a8be46392
[4/4] leds: lp3952: Convert to use maple tree register cache
      commit: 2997d69d888d6ee7114a89d066889a016448422a

--
Lee Jones [李琼斯]