Skip to content
Commit 8f19501d authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (lm90) Only re-read registers if volatile



When reading 16-bit volatile registers, the code uses a trick to
determine if a temperature is consistent: It reads the high part
of the register twice. If the values are the same, the code assumes
that the reading is consistent. If the value differs, the code
re-reads the second register as well and assumes that it now has
correct values.

This is only necessary for volatile registers. Add a parameter to
lm90_read16() to indicate if the register is volatile to avoid the
extra overhead for non-volatile registers.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent b2644494
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment