diff options
Diffstat (limited to 'board/coral/board.c')
-rw-r--r-- | board/coral/board.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/board/coral/board.c b/board/coral/board.c index 2c56f36b0b..5955474620 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -68,18 +68,20 @@ static int sku_id; static void tcpc_alert_event(enum gpio_signal signal) { - if ((signal == GPIO_USB_C0_PD_INT_ODL) && - !gpio_get_level(GPIO_USB_C0_PD_RST_L)) - return; + int port = -1; - if ((signal == GPIO_USB_C1_PD_INT_ODL) && - !gpio_get_level(GPIO_USB_C1_PD_RST_ODL)) + switch (signal) { + case GPIO_USB_C0_PD_INT_ODL: + port = 0; + break; + case GPIO_USB_C1_PD_INT_ODL: + port = 1; + break; + default: return; + } -#ifdef HAS_TASK_PDCMD - /* Exchange status with TCPCs */ - host_command_pd_send_status(PD_CHARGE_NO_CHANGE); -#endif + schedule_deferred_pd_interrupt(port); } #ifdef CONFIG_USB_PD_TCPC_LOW_POWER |