diff options
Diffstat (limited to 'board/volteer')
-rw-r--r-- | board/volteer/board.c | 15 | ||||
-rw-r--r-- | board/volteer/usbc_config.c | 17 |
2 files changed, 17 insertions, 15 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index 39a6b13059..dd92ee499c 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -381,21 +381,6 @@ static void board_tcpc_init(void) DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_CHIPSET); /******************************************************************************/ -/* TCPC support routines */ -uint16_t tcpc_get_alert_status(void) -{ - uint16_t status = 0; - - /* - * Check which port has the ALERT line set - */ - if (!gpio_get_level(GPIO_USB_C0_TCPC_INT_ODL)) - status |= PD_STATUS_TCPC_ALERT_0; - if (!gpio_get_level(GPIO_USB_C1_TCPC_INT_ODL)) - status |= PD_STATUS_TCPC_ALERT_1; - - return status; -} int ppc_get_alert_status(int port) { diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c index 3e2aa2ef26..089f9e1221 100644 --- a/board/volteer/usbc_config.c +++ b/board/volteer/usbc_config.c @@ -242,3 +242,20 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { }, }; BUILD_ASSERT(ARRAY_SIZE(pi3usb9201_bc12_chips) == USBC_PORT_COUNT); + +/******************************************************************************/ +/* TCPC support routines */ +uint16_t tcpc_get_alert_status(void) +{ + uint16_t status = 0; + + /* + * Check which port has the ALERT line set + */ + if (!gpio_get_level(GPIO_USB_C0_TCPC_INT_ODL)) + status |= PD_STATUS_TCPC_ALERT_0; + if (!gpio_get_level(GPIO_USB_C1_TCPC_INT_ODL)) + status |= PD_STATUS_TCPC_ALERT_1; + + return status; +} |