diff options
-rw-r--r-- | baseboard/trogdor/usb_pd_policy.c | 7 | ||||
-rw-r--r-- | board/coachz/board.c | 4 | ||||
-rw-r--r-- | board/lazor/board.c | 4 | ||||
-rw-r--r-- | board/pompom/board.c | 3 | ||||
-rw-r--r-- | board/trogdor/board.c | 4 |
5 files changed, 1 insertions, 21 deletions
diff --git a/baseboard/trogdor/usb_pd_policy.c b/baseboard/trogdor/usb_pd_policy.c index 9230332a3e..f66ea1f276 100644 --- a/baseboard/trogdor/usb_pd_policy.c +++ b/baseboard/trogdor/usb_pd_policy.c @@ -92,12 +92,7 @@ __override void typec_set_source_current_limit(int port, enum tcpc_rp_value rp) int pd_snk_is_vbus_provided(int port) { -#if CONFIG_USB_PD_PORT_MAX_COUNT == 1 - return !gpio_get_level(GPIO_USB_C0_VBUS_DET_L); -#else - return !gpio_get_level(port ? GPIO_USB_C1_VBUS_DET_L : - GPIO_USB_C0_VBUS_DET_L); -#endif + return tcpm_check_vbus_level(port, VBUS_PRESENT); } /* ----------------- Vendor Defined Messages ------------------ */ diff --git a/board/coachz/board.c b/board/coachz/board.c index 3b96d02baa..c4703dc43c 100644 --- a/board/coachz/board.c +++ b/board/coachz/board.c @@ -475,10 +475,6 @@ static void board_switchcap_init(void) /* Initialize board. */ static void board_init(void) { - /* Enable BC1.2 VBUS detection */ - gpio_enable_interrupt(GPIO_USB_C0_VBUS_DET_L); - gpio_enable_interrupt(GPIO_USB_C1_VBUS_DET_L); - /* Enable BC1.2 interrupts */ gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L); gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_L); diff --git a/board/lazor/board.c b/board/lazor/board.c index 8c5496e2a2..3f1c166c30 100644 --- a/board/lazor/board.c +++ b/board/lazor/board.c @@ -475,10 +475,6 @@ static void board_switchcap_init(void) /* Initialize board. */ static void board_init(void) { - /* Enable BC1.2 VBUS detection */ - gpio_enable_interrupt(GPIO_USB_C0_VBUS_DET_L); - gpio_enable_interrupt(GPIO_USB_C1_VBUS_DET_L); - /* Enable BC1.2 interrupts */ gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L); gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_L); diff --git a/board/pompom/board.c b/board/pompom/board.c index 2fa423124d..271784e898 100644 --- a/board/pompom/board.c +++ b/board/pompom/board.c @@ -189,9 +189,6 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { /* Initialize board. */ static void board_init(void) { - /* Enable BC1.2 VBUS detection */ - gpio_enable_interrupt(GPIO_USB_C0_VBUS_DET_L); - /* Enable BC1.2 interrupts */ gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L); diff --git a/board/trogdor/board.c b/board/trogdor/board.c index 8fd4e51f9d..b011364078 100644 --- a/board/trogdor/board.c +++ b/board/trogdor/board.c @@ -233,10 +233,6 @@ BUILD_ASSERT(ARRAY_SIZE(pi3usb9281_chips) == /* Initialize board. */ static void board_init(void) { - /* Enable BC1.2 VBUS detection */ - gpio_enable_interrupt(GPIO_USB_C0_VBUS_DET_L); - gpio_enable_interrupt(GPIO_USB_C1_VBUS_DET_L); - /* Enable BC1.2 interrupts */ gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L); gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_L); |