From: Loic Poulain <loic.poulain@linaro.org>
To: a.zummo@towertech.it, alexandre.belloni@bootlin.com
Cc: linux-rtc@vger.kernel.org, Loic Poulain <loic.poulain@linaro.org>
Subject: [PATCH] rtc: pm8xxx: Return -ENODEV if set_time disallowed
Date: Thu, 17 Feb 2022 10:36:18 +0100 [thread overview]
Message-ID: <1645090578-20734-1-git-send-email-loic.poulain@linaro.org> (raw)
Having !allow_set_time is equivalent to non-implemented set_time
function, which is normally represented with -ENODEV error in RTC
subsystem.
Today we are returning -EACCES error code, which is not considered
by RTC clients as a 'non implemented' feature, and which causes NTP
to retry hw clk sync (update_rtc) indefinitely.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/rtc/rtc-pm8xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index 75954dd..dc6d147 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -84,7 +84,7 @@ static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
const struct pm8xxx_rtc_regs *regs = rtc_dd->regs;
if (!rtc_dd->allow_set_time)
- return -EACCES;
+ return -ENODEV;
secs = rtc_tm_to_time64(tm);
--
2.7.4
next reply other threads:[~2022-02-17 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 9:36 Loic Poulain [this message]
2022-03-25 10:42 ` [PATCH] rtc: pm8xxx: Return -ENODEV if set_time disallowed 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=1645090578-20734-1-git-send-email-loic.poulain@linaro.org \
--to=loic.poulain@linaro.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@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;
as well as URLs for NNTP newsgroup(s).