diff options
author | Guenter Roeck <linux@roeck-us.net> | 2024-07-28 07:09:54 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-07-31 10:43:53 -0700 |
commit | 02c3c4e7026b307a220132b59758432b6e7a0cac (patch) | |
tree | 0ba2ebb9a0aa845a7ccdb45140f962e42175b84f | |
parent | 216147e624638fbcd64ed1014916138733b01653 (diff) |
hwmon: (max1619) Mask valid alarm bits
Bit 0, 5, and 6 in the status register are reserved and, if set, do not
indicate an alarm. Bit 7 is the 'busy' bit and also does not indicate
an alarm. Mask the non-alarm bits to avoid reporting them to userspace.
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/max1619.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c index 8eb7d04bd2f5..5edc9bbbe299 100644 --- a/drivers/hwmon/max1619.c +++ b/drivers/hwmon/max1619.c @@ -112,6 +112,7 @@ static struct max1619_data *max1619_update_device(struct device *dev) config = i2c_smbus_read_byte_data(client, MAX1619_REG_R_CONFIG); if (!(config & 0x20)) data->alarms ^= 0x02; + data->alarms &= 0x1e; data->last_updated = jiffies; data->valid = true; |