summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/systohc.c
diff options
context:
space:
mode:
authorXunlei Pang <pang.xunlei@linaro.org>2015-06-12 11:10:16 +0800
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-06-25 01:13:42 +0200
commit9c5150b31b49e3d89c52df9b1c1ebcea4e665ec3 (patch)
treebba4dff4be684e676b1a148ea7eca8393cb39efb /drivers/rtc/systohc.c
parent9033fd8ba7e96821e65fe3afc3f4077a8b66d1c9 (diff)
downloadblackbird-op-linux-9c5150b31b49e3d89c52df9b1c1ebcea4e665ec3.tar.gz
blackbird-op-linux-9c5150b31b49e3d89c52df9b1c1ebcea4e665ec3.zip
rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronization
Currently, CONFIG_RTC_SYSTOHC uses CONFIG_RTC_HCTOSYS_DEVICE which is originally used by CONFIG_RTC_HCTOSYS, but this rtc device has some limiations, for example, it must be battery-backed, be able to work with irq off and through system suspension, etc. So add CONFIG_RTC_SYSTOHC_DEVICE used exclusively for CONFIG_RTC_SYSTOHC, it is more lenient compared to CONFIG_RTC_HCTOSYS_DEVICE, and could be assigned any available RTC in the system. Default value is CONFIG_RTC_HCTOSYS_DEVICE which is "rtc0" by default. After this patch, NTP will sync up "rtc0" by default. Cc: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/systohc.c')
-rw-r--r--drivers/rtc/systohc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/systohc.c b/drivers/rtc/systohc.c
index 7728d5e32bf4..b4a68ffcd06b 100644
--- a/drivers/rtc/systohc.c
+++ b/drivers/rtc/systohc.c
@@ -31,7 +31,7 @@ int rtc_set_ntp_time(struct timespec64 now)
else
rtc_time64_to_tm(now.tv_sec + 1, &tm);
- rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
+ rtc = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
if (rtc) {
/* rtc_hctosys exclusively uses UTC, so we call set_time here,
* not set_mmss. */
OpenPOWER on IntegriCloud