tcpm/fusb302: Wake charger task on VBUS level change

We need to wake up charger task right after AC is plugged
so that the charge state can be updated immediately.

BUG=b:71520398
BRANCH=none
TEST=Confirm charger task wakes up immediately when AC is
plugged in a Scarlet in G3.

Change-Id: I4a65b3da363cdc204b800bd300824dae616770cb
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/869419
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Philip Chen
2018-01-16 20:29:19 -08:00
committed by chrome-bot
parent 5e18dfc345
commit 85caeb6ccb

View File

@@ -879,6 +879,7 @@ void fusb302_tcpc_alert(int port)
if (interrupt & TCPC_REG_INTERRUPT_VBUSOK) {
/* VBUS crossed threshold */
task_wake(PD_PORT_TO_TASK_ID(port));
hook_notify(HOOK_AC_CHANGE);
}
#endif