]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: accel: kx022a: convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Wed, 12 Feb 2025 07:52:23 +0000 (02:52 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Feb 2025 16:37:17 +0000 (16:37 +0000)
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>
Link: https://patch.msgid.link/20250212075223.4164-5-liubo03@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kionix-kx022a.c

index 5aeb3b951ac5867a711be9da51b7869a1c268d1c..3a56ab00791aeda7cd9e3459c0f7ce2ede664889 100644 (file)
@@ -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 {