]> www.infradead.org Git - users/hch/misc.git/commitdiff
iio: imu: icm42600: convert to use maple tree register cache
authorchuguangqing <chuguangqing@inspur.com>
Wed, 11 Jun 2025 08:58:34 +0000 (16:58 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 26 Jun 2025 18:32:53 +0000 (19:32 +0100)
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: chuguangqing <chuguangqing@inspur.com>
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://patch.msgid.link/20250611085838.4761-7-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c

index 63d46619ebfaa1372171129fca96381ef4606b2e..1fc4fddc2029bd0f3bf9cb8c4a77f86e9667058a 100644 (file)
@@ -83,7 +83,7 @@ const struct regmap_config inv_icm42600_regmap_config = {
        .num_ranges = ARRAY_SIZE(inv_icm42600_regmap_ranges),
        .volatile_table = inv_icm42600_regmap_volatile_accesses,
        .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
 };
 EXPORT_SYMBOL_NS_GPL(inv_icm42600_regmap_config, "IIO_ICM42600");
 
@@ -97,7 +97,7 @@ const struct regmap_config inv_icm42600_spi_regmap_config = {
        .num_ranges = ARRAY_SIZE(inv_icm42600_regmap_ranges),
        .volatile_table = inv_icm42600_regmap_volatile_accesses,
        .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
        .use_single_write = true,
 };
 EXPORT_SYMBOL_NS_GPL(inv_icm42600_spi_regmap_config, "IIO_ICM42600");