• Lars-Peter Clausen's avatar
    hwmon: (adt7410) Don't re-read non-volatile registers · c55dc91e
    Lars-Peter Clausen authored
    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: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    c55dc91e
adt7410.c 12.8 KB