diff options
author | Wai-Hong Tam <waihong@google.com> | 2018-06-20 13:45:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-21 04:45:53 -0700 |
commit | dcec7f8a88c9522e45eab1539d3dd5edb53fae83 (patch) | |
tree | 875fabfeea86ef4c581facc0f5b1abb256fe86f5 /board/cheza | |
parent | 47eb2d5fe7c7ff3bed6f5a33836ec19182d17941 (diff) | |
download | chrome-ec-dcec7f8a88c9522e45eab1539d3dd5edb53fae83.tar.gz |
cheza: Don't defer the VBUS detection interrupt handler
The VBUS detection interrupt handler was moved to the deferred context
because some check requires I2C communication. Now the check result
is cached locally and doesn't need any I2C communication, per the fix:
https://chromium-review.googlesource.com/1086115
So the interrupt handler should not be deferred.
BRANCH=none
BUG=b:74395451
TEST=Plug charger to P0 and/or P1, check the state change correctly.
TEST=Plug device to P0 and/or P1, check sourcing VBUS correctly.
Change-Id: I3ee762b5f1c9a00037da510df83b593c45a4e95a
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1108740
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/cheza')
-rw-r--r-- | board/cheza/board.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/board/cheza/board.c b/board/cheza/board.c index c608ab583f..4703e6dc6e 100644 --- a/board/cheza/board.c +++ b/board/cheza/board.c @@ -62,31 +62,19 @@ static void tcpc_alert_event(enum gpio_signal signal) #endif } -static void vbus0_handler(void) +static void vbus0_evt(enum gpio_signal signal) { /* VBUS present GPIO is inverted */ usb_charger_vbus_change(0, !gpio_get_level(GPIO_USB_C0_VBUS_DET_L)); task_wake(TASK_ID_PD_C0); } -DECLARE_DEFERRED(vbus0_handler); -static void vbus1_handler(void) +static void vbus1_evt(enum gpio_signal signal) { /* VBUS present GPIO is inverted */ usb_charger_vbus_change(1, !gpio_get_level(GPIO_USB_C1_VBUS_DET_L)); task_wake(TASK_ID_PD_C1); } -DECLARE_DEFERRED(vbus1_handler); - -static void vbus0_evt(enum gpio_signal signal) -{ - hook_call_deferred(&vbus0_handler_data, 0); -} - -static void vbus1_evt(enum gpio_signal signal) -{ - hook_call_deferred(&vbus1_handler_data, 0); -} static void usb0_evt(enum gpio_signal signal) { |