diff options
-rw-r--r-- | board/drawcia/board.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/board/drawcia/board.c b/board/drawcia/board.c index 1827c7c6ac..7493f3737f 100644 --- a/board/drawcia/board.c +++ b/board/drawcia/board.c @@ -250,8 +250,6 @@ void board_init(void) { int on; - gpio_enable_interrupt(GPIO_USB_C0_INT_ODL); - if (get_cbi_fw_config_db() == DB_1A_HDMI) { /* Select HDMI option */ gpio_set_level(GPIO_HDMI_SEL_L, 0); @@ -260,7 +258,19 @@ void board_init(void) gpio_set_level(GPIO_HDMI_SEL_L, 1); } + gpio_enable_interrupt(GPIO_USB_C0_INT_ODL); gpio_enable_interrupt(GPIO_USB_C1_INT_ODL); + + + /* + * If interrupt lines are already low, schedule them to be processed + * after inits are completed. + */ + if (!gpio_get_level(GPIO_USB_C0_INT_ODL)) + hook_call_deferred(&check_c0_line_data, 0); + if (!gpio_get_level(GPIO_USB_C1_INT_ODL)) + hook_call_deferred(&check_c1_line_data, 0); + gpio_enable_interrupt(GPIO_USB_C0_CCSBU_OVP_ODL); /* Enable Base Accel interrupt */ gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); |