summaryrefslogtreecommitdiff
path: root/zephyr/emul
diff options
context:
space:
mode:
authorJason Yuan <jasonyuan@google.com>2022-12-14 15:23:05 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-09 22:55:11 +0000
commit00986ffb1ca9dc71e292003691d6c03024a6d26f (patch)
treec57d35d1a91b347447229cdfd2f17b16297c8dd4 /zephyr/emul
parent5b5dee8e82c6c633d8efa92901d6100c0e4b846c (diff)
downloadchrome-ec-00986ffb1ca9dc71e292003691d6c03024a6d26f.tar.gz
zephyr: move usbc interrupt handler to shim
TCPC interrupt no longer uses gpio-int. Instead the shim tcpc completely handles its own interrupt. An optional config is added to allow projects to use the legacy tcpc interrupt. The program intelrvp is excluded from this CL. BUG=b:254148652 TEST=twister, usbc charging on villager, lazor, and xivu BRANCH=none Change-Id: Ieeb4fb61ca6cf8f44df212a6cf520d265cff5147 Signed-off-by: Jason Yuan <jasonyuan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4108942 Commit-Queue: zhi cheng yuan <jasonyuan@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'zephyr/emul')
-rw-r--r--zephyr/emul/tcpc/emul_tcpci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zephyr/emul/tcpc/emul_tcpci.c b/zephyr/emul/tcpc/emul_tcpci.c
index e5dcf78bdc..0deb0c2727 100644
--- a/zephyr/emul/tcpc/emul_tcpci.c
+++ b/zephyr/emul/tcpc/emul_tcpci.c
@@ -221,11 +221,10 @@ static int tcpci_emul_alert_changed(const struct emul *emul)
bool alert_is_active = tcpci_emul_check_int(ctx);
/** Trigger GPIO. */
- if (ctx->alert_gpio_port != NULL) {
+ if (ctx->irq_gpio.port != NULL) {
/* Triggers on edge falling, so set to 0 when there is an alert.
*/
- rc = gpio_emul_input_set(ctx->alert_gpio_port,
- ctx->alert_gpio_pin,
+ rc = gpio_emul_input_set(ctx->irq_gpio.port, ctx->irq_gpio.pin,
alert_is_active ? 0 : 1);
if (rc != 0)
return rc;