diff options
author | Philip Chen <philipchen@google.com> | 2017-09-13 15:04:37 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-26 18:24:07 -0700 |
commit | 72ea08f9db07160177afdf92ba8a7f7e1230331a (patch) | |
tree | f30c50edd992f6105db3140e2dd530c8edcfd05e /common/build.mk | |
parent | be96cd65ed78a15c843e513cebd4345a29e6b2fa (diff) | |
download | chrome-ec-72ea08f9db07160177afdf92ba8a7f7e1230331a.tar.gz |
rtc: Add functions and tests for time conversion
To implement rtc driver for some ec chips, we
need to convert between calandar date and seconds
(since epoch time, 01-01-1970 00:00:00).
Sicne these functions are HW-independent, let's add
common/rtc.c, include/rtc.h, and unit test for this.
BUG=b:63908519
BRANCH=none
TEST=make buildall test -j
Change-Id: Icb1e768d2b3674d5225b83e09475e984eb104d06
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/666985
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Diffstat (limited to 'common/build.mk')
-rw-r--r-- | common/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/build.mk b/common/build.mk index 7f73c885fa..1600bcfbea 100644 --- a/common/build.mk +++ b/common/build.mk @@ -64,6 +64,7 @@ common-$(CONFIG_FMAP)+=fmap.o common-$(CONFIG_GESTURE_SW_DETECTION)+=gesture.o common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o common-$(CONFIG_HOSTCMD_PD)+=host_command_master.o +common-$(CONFIG_HOSTCMD_RTC)+=rtc.o common-$(CONFIG_I2C_MASTER)+=i2c_master.o common-$(CONFIG_I2C_SLAVE)+=i2c_slave.o common-$(CONFIG_I2C_VIRTUAL_BATTERY)+=virtual_battery.o |