From 85caeb6ccb4d9785b1f54a2bf27c146fd930be58 Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Tue, 16 Jan 2018 20:29:19 -0800 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/869419 Commit-Ready: Philip Chen Tested-by: Philip Chen Reviewed-by: Vincent Palatin --- driver/tcpm/fusb302.c | 1 + 1 file changed, 1 insertion(+) 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