summaryrefslogtreecommitdiff
path: root/chip/g/rbox.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2018-08-17 17:57:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-08-23 13:20:46 -0700
commit18307f177db0c517e4734d61e3fd1655ea72b512 (patch)
tree4c710765a1667a0dcd49940b81d895525a3a171c /chip/g/rbox.h
parentf4c3719fd8769c360d17846a554541adcaef5659 (diff)
downloadchrome-ec-18307f177db0c517e4734d61e3fd1655ea72b512.tar.gz
cr50: only enable rbox wakeup during sleep
Enable rbox wakeups before entering any form of sleep. Disable them immediately on resume. Without rbox wakeups enabled during normal operation, we don't need to worry about clearing them after every rbox interrupt. In TOT we missed clearing the power button rbox wakeup. This was causing cr50 to wake up immediately after entering regular sleep. It caused a ton of pmu interrupts and prevented cr50 from staying asleep. With this change cr50 enters enters sleep and deep sleep normally. It only resumes when there's a real wakeup. BUG=none BRANCH=cr50 TEST=verify power button can still wake cr50 from sleep and deep sleep. Run firmware_Cr50DeviceState with TOT Change-Id: I56bf81c19a6e32750dc9d21be7f27188635dd662 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1180572 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip/g/rbox.h')
-rw-r--r--chip/g/rbox.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chip/g/rbox.h b/chip/g/rbox.h
index 5d08118c54..5ceeb81953 100644
--- a/chip/g/rbox.h
+++ b/chip/g/rbox.h
@@ -10,4 +10,9 @@
* Return true if the power button output shows it is pressed
*/
int rbox_powerbtn_is_pressed(void);
+
+/**
+ * Clear the wakeup interrupts
+ */
+void rbox_clear_wakeup(void);
#endif /* __CROS_RBOX_H */