]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (isl28022, nct7363) Convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Thu, 24 Apr 2025 01:08:29 +0000 (21:08 -0400)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 2 May 2025 03:10:36 +0000 (20:10 -0700)
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>
Link: https://lore.kernel.org/r/20250424010829.2610-1-liubo03@inspur.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/isl28022.c
drivers/hwmon/nct7363.c

index 1fb9864635db9ea8c322dd8246e5cdb8ac0c9a9a..0f27ac556f5162ab8c8148374b306af7ef3156b4 100644 (file)
@@ -301,7 +301,7 @@ static const struct regmap_config isl28022_regmap_config = {
        .writeable_reg = isl28022_is_writeable_reg,
        .volatile_reg = isl28022_is_volatile_reg,
        .val_format_endian = REGMAP_ENDIAN_BIG,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
        .use_single_read = true,
        .use_single_write = true,
 };
index be7bf32f6e689d407e858beb4f493471abbe799d..e13ab918b1abe204b2dd62a2f59914b772f36c81 100644 (file)
@@ -391,7 +391,7 @@ static const struct regmap_config nct7363_regmap_config = {
        .val_bits = 8,
        .use_single_read = true,
        .use_single_write = true,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
        .volatile_reg = nct7363_regmap_is_volatile,
 };