From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Artem Panfilov <panfilov.artyom@gmail.com>
Cc: "Maxime Chevallier" <maxime.chevallier@bootlin.com>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
thomas.petazzoni@bootlin.com
Subject: [PATCH 2/2] rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
Date: Fri, 22 Nov 2024 11:10:30 +0100 [thread overview]
Message-ID: <20241122101031.68916-3-maxime.chevallier@bootlin.com> (raw)
In-Reply-To: <20241122101031.68916-1-maxime.chevallier@bootlin.com>
The undervoltage flags reported by the RTC are useful to know if the
time and date are reliable after a reboot. Although the threshold VLOW1
indicates that the thermometer has been shutdown and time compensation
is off, it doesn't mean that the temperature readout is currently
impossible.
As the system is running, the RTC voltage is now fully established and
we can read the temperature.
Fixes: 67075b63cce2 ("rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/rtc/rtc-ab-eoz9.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index 85853da258d2..52914bb3e5e1 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -396,13 +396,6 @@ static int abeoz9z3_temp_read(struct device *dev,
if (ret < 0)
return ret;
- if ((val & ABEOZ9_REG_CTRL_STATUS_V1F) ||
- (val & ABEOZ9_REG_CTRL_STATUS_V2F)) {
- dev_err(dev,
- "thermometer might be disabled due to low voltage\n");
- return -EINVAL;
- }
-
switch (attr) {
case hwmon_temp_input:
ret = regmap_read(regmap, ABEOZ9_REG_REG_TEMP, &val);
--
2.47.0
next prev parent reply other threads:[~2024-11-22 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 10:10 [PATCH 0/2] rtc: ab-eoz9: fix the undervoltage handling Maxime Chevallier
2024-11-22 10:10 ` [PATCH 1/2] rtc: ab-eoz9: check the lowest voltage threshold first Maxime Chevallier
2024-11-22 10:10 ` Maxime Chevallier [this message]
2024-11-25 22:34 ` (subset) [PATCH 2/2] rtc: ab-eoz9: don't fail temperature reads on undervoltage notification Alexandre Belloni
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=20241122101031.68916-3-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexis.lothore@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=panfilov.artyom@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/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®