diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-09-01 10:09:31 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-01 16:41:55 -0700 |
commit | ac1ce379e08505d807eaf5ee2bbb9e1ec1d0b72a (patch) | |
tree | e59b0ffc32b29776ad778e6c37d1b4da25484ff7 /chip/g/idle.c | |
parent | 29d8cc67c35c0e8d17400202fb548707bf448218 (diff) | |
download | chrome-ec-ac1ce379e08505d807eaf5ee2bbb9e1ec1d0b72a.tar.gz |
chip/g: use ccd_ext_is_enabled() instead of ccd_get_mode()
Currently, only usb_pd_protocol.c cares about the actual ccd mode
(disabled/partial/enabled). Everything else just cares whether it's
enabled or not. So promote the boolean ccd_is_connected() from
board/cr50 up to chip/g, and rename it to ccd_ext_is_enabled() to
match the new nomenclature (since 'CCD' itself is now too overloaded).
This will make it easier to handle CCD state directly in board/cr50
after we split it from common/case_closed_debug.c
BUG=none
BRANCH=cr50
TEST=make buildall; boot cr50; make sure USB endpoints still work
Change-Id: Ic3df7467bfe29f1c5d7060cac1309a1f0e090d9e
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648212
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'chip/g/idle.c')
-rw-r--r-- | chip/g/idle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chip/g/idle.c b/chip/g/idle.c index ea994e8dec..78e4e9a1ff 100644 --- a/chip/g/idle.c +++ b/chip/g/idle.c @@ -3,6 +3,7 @@ * found in the LICENSE file. */ +#include "case_closed_debug.h" #include "clock.h" #include "common.h" #include "console.h" @@ -75,7 +76,7 @@ static int utmi_wakeup_is_enabled(void) * USB is only used for CCD, so only enable UTMI wakeups when RDD * detects that a debug accessory is attached. */ - return rdd_is_connected(); + return ccd_ext_is_enabled(); #else /* USB is used for the host interface, so always enable UTMI wakeups */ return 1; |