From aa4b120fda33ba58b45c8570259a916a716c3161 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Mon, 12 Nov 2018 16:06:22 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1332807 Reviewed-by: Diana Z --- baseboard/octopus/variant_usbc_standalone_tcpcs.c | 7 +++++-- 1 file 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)) -- cgit v1.2.1