diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-12-22 17:54:58 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-06 02:46:19 +0000 |
commit | 8828a22f3365d78b59f634a651ceab03aad60a71 (patch) | |
tree | 9f4ad15d6040b016c6694ee844d4d0b30d054573 /board/waddledoo | |
parent | 640e177d806a1ec6236f6f2d5ebe8924ce4f9274 (diff) | |
download | chrome-ec-8828a22f3365d78b59f634a651ceab03aad60a71.tar.gz |
waddledoo: Check Type-C interrupt lines at init
After a sysjump, it could be possible that the Type-C interrupt lines
are asserted. This commit simply has the EC check the interrupt lines
after init and handle them if necessary.
BUG=b:143166332
BRANCH=dedede
TEST=`make -j BOARD=waddledoo`
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I16eef9827ca37cec4b04442a50352795b9652592
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2601777
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/waddledoo')
-rw-r--r-- | board/waddledoo/board.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c index f7146ce8f7..186b99a36c 100644 --- a/board/waddledoo/board.c +++ b/board/waddledoo/board.c @@ -167,7 +167,9 @@ void board_init(void) { int on; + /* Enable C0 interrupt and check if it needs processing */ gpio_enable_interrupt(GPIO_USB_C0_INT_ODL); + check_c0_line(); if (get_cbi_fw_config_db() == DB_1A_HDMI) { /* Disable i2c on HDMI pins */ @@ -192,22 +194,13 @@ void board_init(void) gpio_set_flags(GPIO_EC_I2C_SUB_C1_SDA_HDMI_HPD_ODL, GPIO_INPUT); - /* Enable C1 interrupts */ + /* Enable C1 interrupt and check if it needs processing */ gpio_enable_interrupt(GPIO_SUB_C1_INT_EN_RAILS_ODL); + check_c1_line(); } /* Enable gpio interrupt for base accelgyro sensor */ gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); - /* - * 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_SUB_C1_INT_EN_RAILS_ODL)) - hook_call_deferred(&check_c1_line_data, 0); - - /* Turn on 5V if the system is on, otherwise turn it off. */ on = chipset_in_state(CHIPSET_STATE_ON | CHIPSET_STATE_ANY_SUSPEND | CHIPSET_STATE_SOFT_OFF); |