summaryrefslogtreecommitdiff
path: root/board/jacuzzi/board.c
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2019-10-02 16:34:32 +0800
committerCommit Bot <commit-bot@chromium.org>2019-10-03 07:09:55 +0000
commited8fc57175bce247f84476b972d781301001b7bf (patch)
tree0b1ef659cf6aeed3079019d1ca700f003e372c3e /board/jacuzzi/board.c
parent43e89bafd85ac2c101a2bc68d08d39a1cef19734 (diff)
downloadchrome-ec-ed8fc57175bce247f84476b972d781301001b7bf.tar.gz
jacuzzi: enable bc12 interrupt
BUG=b:141600087 TEST=make sure usb charge task receives USB_CHG_EVENT_BC12 event, and ec console prints "sts = 0x2, lim = 2400 mA, supplier = 6" BRANCH=master Change-Id: I3f654edc38792a71b33975db5de0577bc52e8f35 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1833945 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/jacuzzi/board.c')
-rw-r--r--board/jacuzzi/board.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index 83e56827da..78973eba95 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -200,6 +200,11 @@ int pd_snk_is_vbus_provided(int port)
return EC_ERROR_UNIMPLEMENTED;
}
+void bc12_interrupt(enum gpio_signal signal)
+{
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+}
+
static void board_init(void)
{
/* If the reset cause is external, pulse PMIC force reset. */
@@ -222,6 +227,9 @@ static void board_init(void)
/* Enable interrupt from PMIC. */
gpio_enable_interrupt(GPIO_PMIC_EC_RESETB);
+
+ /* Enable BC12 interrupt */
+ gpio_enable_interrupt(GPIO_BC12_EC_INT_ODL);
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);