summaryrefslogtreecommitdiff
path: root/board/cr50/usb_i2c.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2017-09-01 10:09:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-01 16:41:55 -0700
commitac1ce379e08505d807eaf5ee2bbb9e1ec1d0b72a (patch)
treee59b0ffc32b29776ad778e6c37d1b4da25484ff7 /board/cr50/usb_i2c.c
parent29d8cc67c35c0e8d17400202fb548707bf448218 (diff)
downloadchrome-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 'board/cr50/usb_i2c.c')
-rw-r--r--board/cr50/usb_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/cr50/usb_i2c.c b/board/cr50/usb_i2c.c
index 4c5750de49..66d5aaa632 100644
--- a/board/cr50/usb_i2c.c
+++ b/board/cr50/usb_i2c.c
@@ -78,7 +78,7 @@ int usb_i2c_board_enable(void)
return EC_ERROR_BUSY;
}
- if (!rdd_is_connected())
+ if (!ccd_ext_is_enabled())
return EC_ERROR_BUSY;
if (!ccd_is_cap_enabled(CCD_CAP_I2C))