hwmon: (max6650) Simplify alarm handling
authorGuenter Roeck <linux@roeck-us.net>
Fri, 7 Jun 2019 17:23:21 +0000 (10:23 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jun 2019 01:33:01 +0000 (18:33 -0700)
commit0d5cc9383eea0835621cd458c34f1209d483e2ef
tree34f3cde18942663221e7619079f3a18d6deb09f3
parentf5b20b11bbc230f64c099b12c37121aacf6f0b65
hwmon: (max6650) Simplify alarm handling

Instead of re-reading the alarm register after reporting an alarm,
mark cached values as invalid. While this results in always reading all
data on subsequent reads, it is quite unlikely that such reads will
actually happen before the cache times out. The upside is avoiding
unnecessary unconditional i2c read operations.

Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/max6650.c