This commit registers the RTC device driver at boot, so that the RTC
device can be exported through /dev/rtc0. This allows users to open and
then use various operations with it on application space. This change
takes effects only when the upper-half RTC driver is enabled.
Change-Id: I7215251dafba93544485a58ef49d2aa7503c7fbf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
#include <tinyara/fs/ioctl.h>
#include <chip.h>
+#include "s5j_rtc.h"
#include "up_internal.h"
+
#include <apps/shell/tash.h>
#include "artik053.h"
}
#endif
+#if defined(CONFIG_RTC_DRIVER)
+ {
+ struct rtc_lowerhalf_s *rtclower;
+
+ rtclower = s5j_rtc_lowerhalf();
+ if (rtclower) {
+ ret = rtc_initialize(0, rtclower);
+ if (ret < 0) {
+ lldbg("Failed to register the RTC driver: %d\n",
+ ret);
+ }
+ }
+ }
+#endif /* CONFIG_RTC_DRIVER */
+
scsc_wpa_ctrl_iface_init();
#ifdef CONFIG_TASH