summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2018-01-16 20:29:19 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-08 23:42:09 -0800
commit85caeb6ccb4d9785b1f54a2bf27c146fd930be58 (patch)
treef99d6e0ff2c0d3f787a5853b7c5df3d1d06a0c1f /driver
parent5e18dfc34575e95b3c75de3e02a5d9d42b04c71b (diff)
downloadchrome-ec-85caeb6ccb4d9785b1f54a2bf27c146fd930be58.tar.gz
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>
Diffstat (limited to 'driver')
-rw-r--r--driver/tcpm/fusb302.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c
index 8e13814907..852568f032 100644
--- a/driver/tcpm/fusb302.c
+++ b/driver/tcpm/fusb302.c
@@ -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