Commit 8f2fa472 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Guenter Roeck

hwmon: (jc42) Convert register access and caching to regmap/regcache

Switch the jc42 driver to use an I2C regmap to access the registers.
Also move over to regmap's built-in caching instead of adding a
custom caching implementation. This works for JC42_REG_TEMP_UPPER,
JC42_REG_TEMP_LOWER and JC42_REG_TEMP_CRITICAL as these values never
change except when explicitly written. The cache For JC42_REG_TEMP is
dropped (regmap can't cache it because it's volatile, meaning it can
change at any time) as well for simplicity and consistency with other
drivers.
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20221023213157.11078-2-martin.blumenstingl@googlemail.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 662d20b3
...@@ -807,6 +807,7 @@ config SENSORS_IT87 ...@@ -807,6 +807,7 @@ config SENSORS_IT87
config SENSORS_JC42 config SENSORS_JC42
tristate "JEDEC JC42.4 compliant memory module temperature sensors" tristate "JEDEC JC42.4 compliant memory module temperature sensors"
depends on I2C depends on I2C
select REGMAP_I2C
help help
If you say yes here, you get support for JEDEC JC42.4 compliant If you say yes here, you get support for JEDEC JC42.4 compliant
temperature sensors, which are used on many DDR3 memory modules for temperature sensors, which are used on many DDR3 memory modules for
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment