]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: light: opt4060: convert to use maple tree register cache
authorchuguangqing <chuguangqing@inspur.com>
Wed, 11 Jun 2025 08:58:38 +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>
Link: https://patch.msgid.link/20250611085838.4761-11-chuguangqing@inspur.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/opt4060.c

index f4085020e03ebadb2b91db3212449db82d738ebd..88ed85cf1844a626531de6bb3070176fc4fd6ee4 100644 (file)
@@ -1063,7 +1063,7 @@ static const struct regmap_config opt4060_regmap_config = {
        .name = "opt4060",
        .reg_bits = 8,
        .val_bits = 16,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
        .max_register = OPT4060_DEVICE_ID,
        .readable_reg = opt4060_readable_reg,
        .writeable_reg = opt4060_writable_reg,