]> git.ipfire.org Git - people/ms/linux.git/commitdiff
hwmon: (lm90) Do not report 'busy' status bit as alarm
authorGuenter Roeck <linux@roeck-us.net>
Fri, 3 Dec 2021 21:42:22 +0000 (13:42 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 13 Dec 2021 00:22:53 +0000 (16:22 -0800)
Bit 7 of the status register indicates that the chip is busy
doing a conversion. It does not indicate an alarm status.
Stop reporting it as alarm status bit.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c

index dd8612a9d53623009af6d4ef707baaa2d303a60e..74019dff2550efef903814d3ffaaaee4e168ad91 100644 (file)
@@ -200,6 +200,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
 #define LM90_STATUS_RHIGH      (1 << 4) /* remote high temp limit tripped */
 #define LM90_STATUS_LLOW       (1 << 5) /* local low temp limit tripped */
 #define LM90_STATUS_LHIGH      (1 << 6) /* local high temp limit tripped */
+#define LM90_STATUS_BUSY       (1 << 7) /* conversion is ongoing */
 
 #define MAX6696_STATUS2_R2THRM (1 << 1) /* remote2 THERM limit tripped */
 #define MAX6696_STATUS2_R2OPEN (1 << 2) /* remote2 is an open circuit */
@@ -820,7 +821,7 @@ static int lm90_update_device(struct device *dev)
                val = lm90_read_reg(client, LM90_REG_R_STATUS);
                if (val < 0)
                        return val;
-               data->alarms = val;     /* lower 8 bit of alarms */
+               data->alarms = val & ~LM90_STATUS_BUSY;
 
                if (data->kind == max6696) {
                        val = lm90_select_remote_channel(data, 1);