Skip to content

Commit cdc5287

Browse files
committed
hwmon: (lm90) Do not report 'busy' status bit as alarm
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 <[email protected]>
1 parent da7dc05 commit cdc5287

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hwmon/lm90.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
200200
#define LM90_STATUS_RHIGH (1 << 4) /* remote high temp limit tripped */
201201
#define LM90_STATUS_LLOW (1 << 5) /* local low temp limit tripped */
202202
#define LM90_STATUS_LHIGH (1 << 6) /* local high temp limit tripped */
203+
#define LM90_STATUS_BUSY (1 << 7) /* conversion is ongoing */
203204

204205
#define MAX6696_STATUS2_R2THRM (1 << 1) /* remote2 THERM limit tripped */
205206
#define MAX6696_STATUS2_R2OPEN (1 << 2) /* remote2 is an open circuit */
@@ -820,7 +821,7 @@ static int lm90_update_device(struct device *dev)
820821
val = lm90_read_reg(client, LM90_REG_R_STATUS);
821822
if (val < 0)
822823
return val;
823-
data->alarms = val; /* lower 8 bit of alarms */
824+
data->alarms = val & ~LM90_STATUS_BUSY;
824825

825826
if (data->kind == max6696) {
826827
val = lm90_select_remote_channel(data, 1);

0 commit comments

Comments
 (0)