hwmon: (adt7410) Don't re-read non-volatile registers
commitc55dc91e92bdf21427dd8f5ad779ed9d63caacbd
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 12 Mar 2013 10:38:45 +0000 (12 11:38 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 8 Apr 2013 04:16:38 +0000 (7 21:16 -0700)
treeadcf4aa5fbd1a7cb8d3655ad0a37f4dd161c3035
parentf40fb63e923ccc8c280f8451d4909bb8607a1a8f
hwmon: (adt7410) Don't re-read non-volatile registers

Currently each time the temperature register is read the driver also reads the
threshold and hysteresis registers. This increases the amount of I2C traffic and
time needed to read the temperature by a factor of ~5. Neither the threshold nor
the hysteresis change on their own, so once we have read them, we should be able
to just use the cached value of the registers. This patch modifies the code
accordingly and only reads the threshold and hysteresis registers once during
probe.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/adt7410.c