* [PATCH 0/4] iio: accel: convert to use maple tree register cache
@ 2025-02-12 7:52 Bo Liu
2025-02-12 7:52 ` [PATCH 1/4] iio: accel: msa311: " Bo Liu
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Bo Liu @ 2025-02-12 7:52 UTC (permalink / raw)
To: dan, jic23; +Cc: linux-iio, linux-kernel, Bo Liu
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.
Bo Liu (4):
iio: accel: msa311: convert to use maple tree register cache
iio: accel: bma400: convert to use maple tree register cache
iio: accel: bmi088: convert to use maple tree register cache
iio: accel: kx022a: convert to use maple tree register cache
drivers/iio/accel/bma400_core.c | 2 +-
drivers/iio/accel/bmi088-accel-core.c | 2 +-
drivers/iio/accel/kionix-kx022a.c | 4 ++--
drivers/iio/accel/msa311.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] iio: accel: msa311: convert to use maple tree register cache
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
@ 2025-02-12 7:52 ` Bo Liu
2025-02-12 7:52 ` [PATCH 2/4] iio: accel: bma400: " Bo Liu
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Bo Liu @ 2025-02-12 7:52 UTC (permalink / raw)
To: dan, jic23; +Cc: linux-iio, linux-kernel, Bo Liu
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: Bo Liu <liubo03@inspur.com>
---
drivers/iio/accel/msa311.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/msa311.c b/drivers/iio/accel/msa311.c
index e7fb860f3233..fe4c32a9558a 100644
--- a/drivers/iio/accel/msa311.c
+++ b/drivers/iio/accel/msa311.c
@@ -332,7 +332,7 @@ static const struct regmap_config msa311_regmap_config = {
.wr_table = &msa311_writeable_table,
.rd_table = &msa311_readable_table,
.volatile_table = &msa311_volatile_table,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};
#define MSA311_GENMASK(field) ({ \
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] iio: accel: bma400: convert to use maple tree register cache
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
2025-02-12 7:52 ` [PATCH 1/4] iio: accel: msa311: " Bo Liu
@ 2025-02-12 7:52 ` Bo Liu
2025-02-12 7:52 ` [PATCH 3/4] iio: accel: bmi088: " Bo Liu
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Bo Liu @ 2025-02-12 7:52 UTC (permalink / raw)
To: dan, jic23; +Cc: linux-iio, linux-kernel, Bo Liu
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: Bo Liu <liubo03@inspur.com>
---
drivers/iio/accel/bma400_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c
index ae806ed60271..23f5e1ce9cc4 100644
--- a/drivers/iio/accel/bma400_core.c
+++ b/drivers/iio/accel/bma400_core.c
@@ -190,7 +190,7 @@ const struct regmap_config bma400_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = BMA400_CMD_REG,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.writeable_reg = bma400_is_writable_reg,
.volatile_reg = bma400_is_volatile_reg,
};
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] iio: accel: bmi088: convert to use maple tree register cache
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
2025-02-12 7:52 ` [PATCH 1/4] iio: accel: msa311: " Bo Liu
2025-02-12 7:52 ` [PATCH 2/4] iio: accel: bma400: " Bo Liu
@ 2025-02-12 7:52 ` Bo Liu
2025-02-12 7:52 ` [PATCH 4/4] iio: accel: kx022a: " Bo Liu
2025-02-16 16:38 ` [PATCH 0/4] iio: accel: " Jonathan Cameron
4 siblings, 0 replies; 7+ messages in thread
From: Bo Liu @ 2025-02-12 7:52 UTC (permalink / raw)
To: dan, jic23; +Cc: linux-iio, linux-kernel, Bo Liu
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: Bo Liu <liubo03@inspur.com>
---
drivers/iio/accel/bmi088-accel-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c
index 9206fbdbf520..36e5d06ffd33 100644
--- a/drivers/iio/accel/bmi088-accel-core.c
+++ b/drivers/iio/accel/bmi088-accel-core.c
@@ -145,7 +145,7 @@ const struct regmap_config bmi088_regmap_conf = {
.val_bits = 8,
.max_register = 0x7E,
.volatile_table = &bmi088_volatile_table,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};
EXPORT_SYMBOL_NS_GPL(bmi088_regmap_conf, "IIO_BMI088");
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] iio: accel: kx022a: convert to use maple tree register cache
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
` (2 preceding siblings ...)
2025-02-12 7:52 ` [PATCH 3/4] iio: accel: bmi088: " Bo Liu
@ 2025-02-12 7:52 ` Bo Liu
2025-02-14 6:36 ` Matti Vaittinen
2025-02-16 16:38 ` [PATCH 0/4] iio: accel: " Jonathan Cameron
4 siblings, 1 reply; 7+ messages in thread
From: Bo Liu @ 2025-02-12 7:52 UTC (permalink / raw)
To: dan, jic23; +Cc: linux-iio, linux-kernel, Bo Liu
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: Bo Liu <liubo03@inspur.com>
---
drivers/iio/accel/kionix-kx022a.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index 5aeb3b951ac5..3a56ab00791a 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -149,7 +149,7 @@ static const struct regmap_config kx022a_regmap_config = {
.rd_noinc_table = &kx022a_nir_regs,
.precious_table = &kx022a_precious_regs,
.max_register = KX022A_MAX_REGISTER,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};
/* Regmap configs kx132 */
@@ -260,7 +260,7 @@ static const struct regmap_config kx132_regmap_config = {
.rd_noinc_table = &kx132_nir_regs,
.precious_table = &kx132_precious_regs,
.max_register = KX132_MAX_REGISTER,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
};
struct kx022a_data {
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] iio: accel: kx022a: convert to use maple tree register cache
2025-02-12 7:52 ` [PATCH 4/4] iio: accel: kx022a: " Bo Liu
@ 2025-02-14 6:36 ` Matti Vaittinen
0 siblings, 0 replies; 7+ messages in thread
From: Matti Vaittinen @ 2025-02-14 6:36 UTC (permalink / raw)
To: Bo Liu, dan, jic23; +Cc: linux-iio, linux-kernel
On 12/02/2025 09:52, Bo Liu 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: Bo Liu <liubo03@inspur.com>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
> drivers/iio/accel/kionix-kx022a.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
> index 5aeb3b951ac5..3a56ab00791a 100644
> --- a/drivers/iio/accel/kionix-kx022a.c
> +++ b/drivers/iio/accel/kionix-kx022a.c
> @@ -149,7 +149,7 @@ static const struct regmap_config kx022a_regmap_config = {
> .rd_noinc_table = &kx022a_nir_regs,
> .precious_table = &kx022a_precious_regs,
> .max_register = KX022A_MAX_REGISTER,
> - .cache_type = REGCACHE_RBTREE,
> + .cache_type = REGCACHE_MAPLE,
> };
>
> /* Regmap configs kx132 */
> @@ -260,7 +260,7 @@ static const struct regmap_config kx132_regmap_config = {
> .rd_noinc_table = &kx132_nir_regs,
> .precious_table = &kx132_precious_regs,
> .max_register = KX132_MAX_REGISTER,
> - .cache_type = REGCACHE_RBTREE,
> + .cache_type = REGCACHE_MAPLE,
> };
>
> struct kx022a_data {
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/4] iio: accel: convert to use maple tree register cache
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
` (3 preceding siblings ...)
2025-02-12 7:52 ` [PATCH 4/4] iio: accel: kx022a: " Bo Liu
@ 2025-02-16 16:38 ` Jonathan Cameron
4 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2025-02-16 16:38 UTC (permalink / raw)
To: Bo Liu; +Cc: dan, linux-iio, linux-kernel
On Wed, 12 Feb 2025 02:52:19 -0500
Bo Liu <liubo03@inspur.com> 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.
>
> Bo Liu (4):
> iio: accel: msa311: convert to use maple tree register cache
> iio: accel: bma400: convert to use maple tree register cache
> iio: accel: bmi088: convert to use maple tree register cache
> iio: accel: kx022a: convert to use maple tree register cache
>
> drivers/iio/accel/bma400_core.c | 2 +-
> drivers/iio/accel/bmi088-accel-core.c | 2 +-
> drivers/iio/accel/kionix-kx022a.c | 4 ++--
> drivers/iio/accel/msa311.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
These are all fairly small register maps so I doubt it makes much
real difference. Still there is the possibility these get copied
into a driver with a much larger regmap, so fair enough to tidy these
up. Applied to the togreg branch of iio.git and pushed out as testing
for 0-day to take a first look.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-16 16:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 7:52 [PATCH 0/4] iio: accel: convert to use maple tree register cache Bo Liu
2025-02-12 7:52 ` [PATCH 1/4] iio: accel: msa311: " Bo Liu
2025-02-12 7:52 ` [PATCH 2/4] iio: accel: bma400: " Bo Liu
2025-02-12 7:52 ` [PATCH 3/4] iio: accel: bmi088: " Bo Liu
2025-02-12 7:52 ` [PATCH 4/4] iio: accel: kx022a: " Bo Liu
2025-02-14 6:36 ` Matti Vaittinen
2025-02-16 16:38 ` [PATCH 0/4] iio: accel: " Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.