summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-11-12 16:06:22 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-11-16 05:02:10 -0800
commitaa4b120fda33ba58b45c8570259a916a716c3161 (patch)
treec5a9b6a69824014ff986007dfe79436dc769fdca
parentf9f3ed0467fe2062c7916c892ecbcf00f957095a (diff)
downloadchrome-ec-aa4b120fda33ba58b45c8570259a916a716c3161.tar.gz
octopus: ignore C0 interrupts if in reset
Now that we have a reset line to C0, we should ignore interrupts while the C0 TCPC is in reset. BRANCH=none BUG=none TEST=flashed on fleex (uses C0 reset) without issue Change-Id: I014e95f80844b30623d1fba7e59bea8f5eb8572e Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1332807 Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r--baseboard/octopus/variant_usbc_standalone_tcpcs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/baseboard/octopus/variant_usbc_standalone_tcpcs.c b/baseboard/octopus/variant_usbc_standalone_tcpcs.c
index e5db47325f..ffa26336bb 100644
--- a/baseboard/octopus/variant_usbc_standalone_tcpcs.c
+++ b/baseboard/octopus/variant_usbc_standalone_tcpcs.c
@@ -112,8 +112,11 @@ uint16_t tcpc_get_alert_status(void)
{
uint16_t status = 0;
- if (!gpio_get_level(GPIO_USB_C0_MUX_INT_ODL))
- status |= PD_STATUS_TCPC_ALERT_0;
+ if (!gpio_get_level(GPIO_USB_C0_MUX_INT_ODL)) {
+ if (!gpio_is_implemented(GPIO_USB_C0_PD_RST) ||
+ !gpio_get_level(GPIO_USB_C0_PD_RST))
+ status |= PD_STATUS_TCPC_ALERT_0;
+ }
if (!gpio_get_level(GPIO_USB_C1_MUX_INT_ODL)) {
if (gpio_get_level(GPIO_USB_C1_PD_RST_ODL))