From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>,
Sasha Levin <sashal@kernel.org>,
jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 4/9] hwmon: (lm90) Do not report 'busy' status bit as alarm
Date: Mon, 27 Dec 2021 14:05:31 -0500 [thread overview]
Message-ID: <20211227190536.1042975-4-sashal@kernel.org> (raw)
In-Reply-To: <20211227190536.1042975-1-sashal@kernel.org>
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit cdc5287acad9ede121924a9c9313544b80d15842 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/lm90.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 9b3c9f390ef81..c2a7fe6827915 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -184,6 +184,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 */
@@ -773,7 +774,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);
--
2.34.1
next prev parent reply other threads:[~2021-12-27 19:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-27 19:05 [PATCH AUTOSEL 5.4 1/9] pinctrl: mediatek: fix global-out-of-bounds issue Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 2/9] Input: i8042 - add deferred probe support Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 3/9] Input: i8042 - enable deferred probe quirk for ASUS UM325UA Sasha Levin
2021-12-27 19:05 ` Sasha Levin [this message]
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 5/9] tomoyo: Check exceeded quota early in tomoyo_domain_quota_is_ok() Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 6/9] ax25: NPD bug when detaching AX25 device Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 7/9] phonet/pep: refuse to enable an unbound pipe Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 8/9] platform/x86: apple-gmux: use resource_size() with res Sasha Levin
2021-12-27 19:05 ` [PATCH AUTOSEL 5.4 9/9] memblock: fix memblock_phys_alloc() section mismatch error Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211227190536.1042975-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®