提交 cc9f6bc4 编写于 作者: G Guenter Roeck 提交者: Zheng Zengkai

hwmon: (lm90) Do not report 'busy' status bit as alarm

stable inclusion
from stable-v5.10.89
commit 50f78486f90b91484001bfccc652d66fc308255a
bugzilla: 186140 https://gitee.com/openeuler/kernel/issues/I4S8HA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=50f78486f90b91484001bfccc652d66fc308255a

--------------------------------

commit cdc5287a upstream.

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: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 dba1285c
...@@ -200,6 +200,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680, ...@@ -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_RHIGH (1 << 4) /* remote high temp limit tripped */
#define LM90_STATUS_LLOW (1 << 5) /* local low 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_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_R2THRM (1 << 1) /* remote2 THERM limit tripped */
#define MAX6696_STATUS2_R2OPEN (1 << 2) /* remote2 is an open circuit */ #define MAX6696_STATUS2_R2OPEN (1 << 2) /* remote2 is an open circuit */
...@@ -819,7 +820,7 @@ static int lm90_update_device(struct device *dev) ...@@ -819,7 +820,7 @@ static int lm90_update_device(struct device *dev)
val = lm90_read_reg(client, LM90_REG_R_STATUS); val = lm90_read_reg(client, LM90_REG_R_STATUS);
if (val < 0) if (val < 0)
return val; return val;
data->alarms = val; /* lower 8 bit of alarms */ data->alarms = val & ~LM90_STATUS_BUSY;
if (data->kind == max6696) { if (data->kind == max6696) {
val = lm90_select_remote_channel(data, 1); val = lm90_select_remote_channel(data, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册