Skip to content

Commit 870c54e

Browse files
Loic Poulainalexandrebelloni
authored andcommitted
rtc: pm8xxx: Return -ENODEV if set_time disallowed
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1645090578-20734-1-git-send-email-loic.poulain@linaro.org
1 parent b5bf5b2 commit 870c54e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-pm8xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
8484
const struct pm8xxx_rtc_regs *regs = rtc_dd->regs;
8585

8686
if (!rtc_dd->allow_set_time)
87-
return -EACCES;
87+
return -ENODEV;
8888

8989
secs = rtc_tm_to_time64(tm);
9090

0 commit comments

Comments
 (0)