rtc: compile date.c if DM_RTC
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Wed, 11 Jul 2018 09:06:06 +0000 (18:06 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 24 Jul 2018 13:25:23 +0000 (09:25 -0400)
rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least
PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if
we don't want or need this command.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/rtc/date.c

index f2568cf..c57317d 100644 (file)
@@ -9,7 +9,8 @@
 #include <errno.h>
 #include <rtc.h>
 
-#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP)
+#if defined(CONFIG_CMD_DATE) || defined(CONFIG_DM_RTC) || \
+                               defined(CONFIG_TIMESTAMP)
 
 #define FEBRUARY               2
 #define        STARTOFTIME             1970