mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user