reef: Check if interrupt is active in tcpc_alert_event

This ensures that we're only checking the reset signal for the
corresponding interrupt. Otherwise we can hit a race condition
when both TCPC chips are taken out of reset.

(This is also how it's done on Amenia)

BUG=none
BRANCH=none
TEST=needs testing

Change-Id: I47513b3b47e947c8b4644f4d837ddc3fb1ee7a30
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/361061
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
David Hendricks
2016-07-15 18:28:34 -07:00
committed by chrome-bot
parent 854695981f
commit 9d2cb33fb1

View File

@@ -58,7 +58,8 @@
static void tcpc_alert_event(enum gpio_signal signal)
{
if (!gpio_get_level(GPIO_USB_PD_RST_ODL))
if ((signal == GPIO_USB_C0_PD_INT) &&
!gpio_get_level(GPIO_USB_PD_RST_ODL))
return;
#ifdef HAS_TASK_PDCMD