From 9634e023470dba161b3a85d5e8344610dcb9eec9 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Tue, 16 Oct 2018 10:36:19 -0600 Subject: usb-c: use higher priority task for interrupts This should be the last step to make all boards on ToT follow go/usb-pd-slow-response-time. Theses boards all have the higher priority tasks, but they aren't being used since the tcpc interrupt wasn't scheduling calls on it. BRANCH=none BUG=b:112088135 TEST=builds Change-Id: I2c39e661e804f88edd5b34636b93e6e63a5af57f Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/1283452 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Aseda Aboagye --- board/eve/board.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'board/eve') diff --git a/board/eve/board.c b/board/eve/board.c index 46260c0672..a204851d96 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -62,17 +62,20 @@ 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; - else if ((signal == GPIO_USB_C1_PD_INT_ODL) && - !gpio_get_level(GPIO_USB_C1_PD_RST_L)) + int port = -1; + + 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); } /* -- cgit v1.2.1