From 77c17a20543f8648cf9ddba25f2d4d66a1bbd393 Mon Sep 17 00:00:00 2001 From: Stephen Barber Date: Fri, 8 Jul 2016 17:52:41 -0700 Subject: [PATCH] common: add EC_RTC_ALARM_CLEAR to ec_commands.h EC_RTC_ALARM_CLEAR should live in ec_commands.h so other EC clients such as the kernel can make use of it. Signed-off-by: Stephen Barber BRANCH=none BUG=chrome-os-partner:52219 TEST=kernel can clear existing alarm Change-Id: I88aefed7e6c37a5aa2e4306c078e90d671c410d0 Reviewed-on: https://chromium-review.googlesource.com/359352 Commit-Ready: Stephen Barber Tested-by: Stephen Barber Reviewed-by: Stephen Barber Reviewed-by: Shawn N --- chip/npcx/system.c | 1 - include/ec_commands.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chip/npcx/system.c b/chip/npcx/system.c index bda6fe6e3a..2e8493be98 100644 --- a/chip/npcx/system.c +++ b/chip/npcx/system.c @@ -417,7 +417,6 @@ static char system_to_hex(uint8_t x) * stores wakeup time in seconds. * Set seconds = 0 to disable the alarm */ -#define EC_RTC_ALARM_CLEAR 0 void system_set_rtc_alarm(uint32_t seconds, uint32_t microseconds) { uint32_t cur_secs, alarm_secs; diff --git a/include/ec_commands.h b/include/ec_commands.h index 18f5f839f7..c69440fb06 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2147,6 +2147,9 @@ struct ec_response_rtc { #define EC_CMD_RTC_SET_VALUE 0x46 #define EC_CMD_RTC_SET_ALARM 0x47 +/* Pass as time param to SET_ALARM to clear the current alarm */ +#define EC_RTC_ALARM_CLEAR 0 + /*****************************************************************************/ /* Port80 log access */