diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-12-22 16:22:00 -0800 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-02-27 17:03:16 -0800 |
commit | 719af4f1a40bdf46cab7e4db216af7084a70897b (patch) | |
tree | d86c1a528380836f64353ab16aa4a3dc006491cb /drivers/hwmon/Kconfig | |
parent | 81de0eea2bbc1b1334d40c4bb420219b603b4c45 (diff) |
hwmon: (lm83) Use regmap
Using local caching in this driver had few benefits. It used cached values
for two seconds and then re-read all registers from the chip even if the
user only accessed a single attribute. On top of that, alarm attributes
were stale for up to four seconds (the first status register read reports
and clears an alarm, the second reports it cleared). Use regmap instead
for caching. Do not re-read non-volatile registers, and do not cache
volatile registers.
As part of this change, handle register read and write address differences
in regmap code. This is necessary to avoid problems with caching in the
regmap core, and ultimately simplifies the code.
Also, errors observed when reading from and writing to registers are no
longer ignored.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/Kconfig')
-rw-r--r-- | drivers/hwmon/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 8df25f1079ba..01ab80a2cc4a 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1288,6 +1288,7 @@ config SENSORS_LM80 config SENSORS_LM83 tristate "National Semiconductor LM83 and compatibles" depends on I2C + select REGMAP help If you say yes here you get support for National Semiconductor LM82 and LM83 sensor chips. |