hwmon: (tmp102) Use maple tree register cache
authorMark Brown <broonie@kernel.org>
Sat, 10 Jun 2023 13:59:09 +0000 (14:59 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 10 Jun 2023 14:37:02 +0000 (07:37 -0700)
The tmp102 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-3-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp102.c

index 6359d12..2506c78 100644 (file)
@@ -184,7 +184,7 @@ static const struct regmap_config tmp102_regmap_config = {
        .writeable_reg = tmp102_is_writeable_reg,
        .volatile_reg = tmp102_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,
 };