diff options
Diffstat (limited to 'board/phaser/board.c')
-rw-r--r-- | board/phaser/board.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/phaser/board.c b/board/phaser/board.c index 94e58e4e0b..ee3c8601cb 100644 --- a/board/phaser/board.c +++ b/board/phaser/board.c @@ -300,3 +300,13 @@ static void board_chipset_suspend(void) sb_quick_charge_mode(1); } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); + +void board_overcurrent_event(int port, int is_overcurrented) +{ + /* Sanity check the port. */ + if ((port < 0) || (port >= CONFIG_USB_PD_PORT_COUNT)) + return; + + /* Note that the level is inverted because the pin is active low. */ + gpio_set_level(GPIO_USB_C_OC, !is_overcurrented); +} |