summaryrefslogtreecommitdiff
path: root/common/usbc_intr_task.c
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-04-02 16:25:51 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-06 18:00:28 +0000
commite820abf4090c36067d9f1ad85d6ea6b41c0063c0 (patch)
tree07e9595bb802427d1c36f7404124bc3b93dc67c0 /common/usbc_intr_task.c
parent42a750d21c2fd2dcc33d24c0a03c2800a1ceccbc (diff)
downloadchrome-ec-e820abf4090c36067d9f1ad85d6ea6b41c0063c0.tar.gz
PD_INT: Add ability to process non-TCPC alerts in PD_INT
Some boards may have other chips sharing the TCPC interrupt line, in which case their alerts may need to be handled at the same priority as the TCPC itself. Otherwise, it becomes difficult to respond quickly to TCPC interrupts. BRANCH=None BUG=b:182534117,b:183679237 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I905f20eeb0dd89c8516de31005d402a890906595 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803460 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common/usbc_intr_task.c')
-rw-r--r--common/usbc_intr_task.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/usbc_intr_task.c b/common/usbc_intr_task.c
index 7470696c18..aa5242a5d5 100644
--- a/common/usbc_intr_task.c
+++ b/common/usbc_intr_task.c
@@ -70,8 +70,14 @@ static void service_one_port(int port)
}
}
+__overridable void board_process_pd_alert(int port)
+{
+}
+
/*
- * Main task entry point that handles PD interrupts for a single port
+ * Main task entry point that handles PD interrupts for a single port. These
+ * interrupts usually come from a TCPC, but may also come from PD-related chips
+ * sharing the TCPC interrupt line.
*
* @param p The PD port number for which to handle interrupts (pointer is
* reinterpreted as an integer directly).
@@ -112,6 +118,8 @@ void pd_interrupt_handler_task(void *p)
service_one_port(port);
}
+
+ board_process_pd_alert(port);
}
}