diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-11-15 23:38:57 +0300 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2010-11-15 23:38:57 +0300 |
commit | 793c51d5fdfa76043f1221fdaa022f50146e8386 (patch) | |
tree | 7e6bc3676e24fa1ccadf5b4621f868f7ecff2940 /drivers/hwmon/w83795.c | |
parent | cf6b9ea661ef4f20b4a4cba1a232a732339aae2c (diff) | |
download | linux-793c51d5fdfa76043f1221fdaa022f50146e8386.tar.xz |
hwmon: (w83795) Clear intrusion alarm immediately
When asked to clear the intrusion alarm, do so immediately. We have to
invalidate the cache to make sure the new status will be read. But we
also have to read from the status register once to clear the pending
alarm, as writing to CLR_CHS surprising won't clear it automatically.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/w83795.c')
-rw-r--r-- | drivers/hwmon/w83795.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 600b2adbbd49..90f4ffb357b7 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c @@ -755,6 +755,10 @@ store_chassis_clear(struct device *dev, val = w83795_read(client, W83795_REG_CLR_CHASSIS); val |= 0x80; w83795_write(client, W83795_REG_CLR_CHASSIS, val); + + /* Clear status and force cache refresh */ + w83795_read(client, W83795_REG_ALARM(5)); + data->valid = 0; mutex_unlock(&data->update_lock); return count; } |