2023-09-29 15:37:24

by Mark Brown

[permalink] [raw]
Subject: [PATCH 0/4] 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.

Signed-off-by: Mark Brown <[email protected]>
---
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,
--
Mark Brown <[email protected]>


2023-09-29 15:37:54

by Mark Brown

[permalink] [raw]
Subject: [PATCH 3/4] leds: lm392x: 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.

Signed-off-by: Mark Brown <[email protected]>
---
drivers/leds/leds-lm3692x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-lm3692x.c b/drivers/leds/leds-lm3692x.c
index f8ad61e47a19..c319ff4d70b2 100644
--- a/drivers/leds/leds-lm3692x.c
+++ b/drivers/leds/leds-lm3692x.c
@@ -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)

--
2.39.2

2023-09-29 16:12:27

by Mark Brown

[permalink] [raw]
Subject: [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.

Signed-off-by: Mark Brown <[email protected]>
---
drivers/leds/flash/leds-lm3601x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm3601x.c
index b6c524facf49..8191be0ef0c6 100644
--- a/drivers/leds/flash/leds-lm3601x.c
+++ b/drivers/leds/flash/leds-lm3601x.c
@@ -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,
};


--
2.39.2

2023-10-05 15:33:49

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/4] leds: Convert to use maple tree register cache

On Fri, 29 Sep 2023 17:23:34 +0200, Mark Brown wrote:
> 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 [李琼斯]