From ba4ebeb6e021779cacc4888e047157a61ca58437 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Tue, 16 Oct 2018 08:14:30 -0600 Subject: cheza: start using higher priority task The last step to convert cheze over to using a higher priority USB-PD interrupt is to update the interrupt handler BRANCH=none BUG=b:117498337 TEST=verified that HARD RST goes away after Source_Cap Change-Id: Ibb4afec382845e6505425778473c795909a3c9b1 Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/1283240 Tested-by: Wai-Hong Tam Reviewed-by: Wai-Hong Tam --- board/cheza/board.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'board/cheza') diff --git a/board/cheza/board.c b/board/cheza/board.c index 173b97fb85..e1d85f91f2 100644 --- a/board/cheza/board.c +++ b/board/cheza/board.c @@ -54,10 +54,20 @@ static void anx74xx_cable_det_interrupt(enum gpio_signal signal); /* GPIO Interrupt Handlers */ static void tcpc_alert_event(enum gpio_signal signal) { -#ifdef HAS_TASK_PDCMD - /* Exchange status with TCPCs */ - host_command_pd_send_status(PD_CHARGE_NO_CHANGE); -#endif + 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; + } + + schedule_deferred_pd_interrupt(port); } static void vbus0_evt(enum gpio_signal signal) -- cgit v1.2.1