diff options
author | Rob Barnes <robbarnes@google.com> | 2021-01-05 16:44:46 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-11 16:59:09 +0000 |
commit | 0b8aaed16b14c0d3b6b86db4c6383cb6818c898a (patch) | |
tree | 863f735deb13d59c767aabc4bdfcafd6c0037d95 | |
parent | c938d76769c2333cdb15d46875ba9ed604fa2928 (diff) | |
download | chrome-ec-0b8aaed16b14c0d3b6b86db4c6383cb6818c898a.tar.gz |
guybrush: Implement bc12_interrupt
Implement bc12_interrupt stub.
Add task.h to usb_charge.h to fix build error.
BUG=None
BRANCH=None
TEST=Build
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I7d3d14326cf6973b131a6f575eb305039772df04
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611518
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | baseboard/guybrush/baseboard.c | 13 | ||||
-rw-r--r-- | include/usb_charge.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c index cf3cd6edca..6cae883098 100644 --- a/baseboard/guybrush/baseboard.c +++ b/baseboard/guybrush/baseboard.c @@ -511,7 +511,18 @@ void ppc_interrupt(enum gpio_signal signal) void bc12_interrupt(enum gpio_signal signal) { - /* TODO */ + switch (signal) { + case GPIO_USB_C0_BC12_INT_ODL: + task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12); + break; + + case GPIO_USB_C1_BC12_INT_ODL: + task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12); + break; + + default: + break; + } } int baseboard_get_temp(int idx, int *temp_ptr) diff --git a/include/usb_charge.h b/include/usb_charge.h index dd0f221c28..7a102dac4c 100644 --- a/include/usb_charge.h +++ b/include/usb_charge.h @@ -11,6 +11,7 @@ #include "charge_manager.h" #include "common.h" #include "ec_commands.h" +#include "task.h" /* USB charger voltage */ #define USB_CHARGER_VOLTAGE_MV 5000 |