2023-09-30 23:47:42

by Mark Brown

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

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


2023-09-30 23:48:56

by Mark Brown

[permalink] [raw]
Subject: [PATCH 2/3] mfd: max77686: 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/mfd/max77686.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
index 91c286c4571c..0118a444a68b 100644
--- a/drivers/mfd/max77686.c
+++ b/drivers/mfd/max77686.c
@@ -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[] = {

--
2.39.2

2023-09-30 23:48:57

by Mark Brown

[permalink] [raw]
Subject: [PATCH 3/3] mfd: max8907: 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/mfd/max8907.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c
index 8bbe7979db91..accf426234b6 100644
--- a/drivers/mfd/max8907.c
+++ b/drivers/mfd/max8907.c
@@ -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[] = {

--
2.39.2

2023-09-30 23:49:36

by Mark Brown

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

Signed-off-by: Mark Brown <[email protected]>
---
drivers/mfd/max77620.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index e63e8e47d908..74ef3f6d576c 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -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,

--
2.39.2

2023-10-03 06:29:51

by Krzysztof Kozlowski

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

On 01/10/2023 01:47, Mark Brown 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: Mark Brown <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-10-03 06:30:07

by Krzysztof Kozlowski

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

On 01/10/2023 01:47, Mark Brown 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: Mark Brown <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-10-03 08:27:09

by Chanwoo Choi

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

Hi,

On 23. 10. 1. 08:47, Mark Brown 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: Mark Brown <[email protected]>
> ---
> drivers/mfd/max77686.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
> index 91c286c4571c..0118a444a68b 100644
> --- a/drivers/mfd/max77686.c
> +++ b/drivers/mfd/max77686.c
> @@ -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[] = {
>

Reviewed-by: Chanwoo Choi <[email protected]>

Thanks.

--
Best Regards,
Samsung Electronics
Chanwoo Choi

2023-10-05 16:21:21

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/3] mfd: maxim: Convert to use maple tree cache

On Sun, 01 Oct 2023 00:47:04 +0100, Mark Brown wrote:
> 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 [李琼斯]