rtc: pm8xxx: Return -ENODEV if set_time disallowed
authorLoic Poulain <loic.poulain@linaro.org>
Thu, 17 Feb 2022 09:36:18 +0000 (10:36 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 25 Mar 2022 10:38:33 +0000 (11:38 +0100)
commit870c54e1a3e111613cd68e5cc867455dc4765cd6
treebc2685a5914a60b4183c4d20b0309220d9a176ff
parentb5bf5b283d07bd1f4d49657557fb99ec5fbfc588
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
drivers/rtc/rtc-pm8xxx.c