diff options
-rw-r--r-- | board/nocturne/board.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c index 39a7913f56..4afb2fb581 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -749,20 +749,24 @@ uint16_t tcpc_get_alert_status(void) * The interrupt line is shared between the TCPC and PPC. Therefore, go * out and actually read the alert registers to report the alert status. */ - if (!tcpc_read16(0, TCPC_REG_ALERT, ®val)) { - /* The TCPCI spec says to ignore bits 14:12. */ - regval &= ~((1 << 14) | (1 << 13) | (1 << 12)); + if (!gpio_get_level(GPIO_USB_C0_PD_INT_ODL)) { + if (!tcpc_read16(0, TCPC_REG_ALERT, ®val)) { + /* The TCPCI spec says to ignore bits 14:12. */ + regval &= ~((1 << 14) | (1 << 13) | (1 << 12)); - if (regval) - status |= PD_STATUS_TCPC_ALERT_0; + if (regval) + status |= PD_STATUS_TCPC_ALERT_0; + } } - if (!tcpc_read16(1, TCPC_REG_ALERT, ®val)) { - /* TCPCI spec says to ignore bits 14:12. */ - regval &= ~((1 << 14) | (1 << 13) | (1 << 12)); + if (!gpio_get_level(GPIO_USB_C1_PD_INT_ODL)) { + if (!tcpc_read16(1, TCPC_REG_ALERT, ®val)) { + /* TCPCI spec says to ignore bits 14:12. */ + regval &= ~((1 << 14) | (1 << 13) | (1 << 12)); - if (regval) - status |= PD_STATUS_TCPC_ALERT_1; + if (regval) + status |= PD_STATUS_TCPC_ALERT_1; + } } return status; |