diff options
author | Philip Chen <philipchen@google.com> | 2017-10-03 18:58:30 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-06 00:21:29 -0700 |
commit | 93a25281977d677b48955e98249a1314ef4bcd54 (patch) | |
tree | 8e531cf197b4a89b03a722a71b58bcedbff23d95 /chip/stm32 | |
parent | 286b800f14b139ca5d349d35142d7f31f3655689 (diff) | |
download | chrome-ec-93a25281977d677b48955e98249a1314ef4bcd54.tar.gz |
chip/stm32/clock: Don't wake up the host when the host resets rtc
The way AP resets ec rtc alarm is to set rtc alarm wake time in 0 sec.
In current implementation, this still sets host_rtc_alarm_set.
...So when rtc irq is triggered next time, it wakes up the host even if
the alarm is not set by the host.
Let's fix it.
BUG=b:66971951, b:67379662
BRANCH=none
TEST='powerd_dbus_suspend' and see the host stay in suspend mode
Change-Id: I1e14f669e3d887874548813c7c5b4d21d80bc62e
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/699657
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'chip/stm32')
-rw-r--r-- | chip/stm32/clock-f.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/stm32/clock-f.c b/chip/stm32/clock-f.c index b64903de44..7f1fa8e03e 100644 --- a/chip/stm32/clock-f.c +++ b/chip/stm32/clock-f.c @@ -406,7 +406,8 @@ static int system_rtc_set_alarm(struct host_cmd_handler_args *args) struct rtc_time_reg rtc; const struct ec_params_rtc *p = args->params; - host_rtc_alarm_set = 1; + if (p->time != EC_RTC_ALARM_CLEAR) + host_rtc_alarm_set = 1; set_rtc_alarm(p->time, 0, &rtc); return EC_RES_SUCCESS; } |