]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (adt7410) Don't re-read non-volatile registers
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 12 Mar 2013 10:38:45 +0000 (11:38 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 1 Apr 2013 02:36:42 +0000 (19:36 -0700)
commitec10a307e0b036ae245cfe5911729f6b4dc04f12
treeb558f34efb2edd78a85f7f1d2aec3997a8146192
parentc50fe06f863d2f895815f679c14ba6211fecf420
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