diff options
Diffstat (limited to 'zephyr/shim/include/usbc/tcpc_fusb302.h')
-rw-r--r-- | zephyr/shim/include/usbc/tcpc_fusb302.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/zephyr/shim/include/usbc/tcpc_fusb302.h b/zephyr/shim/include/usbc/tcpc_fusb302.h index 2a7e684564..6989dbd21e 100644 --- a/zephyr/shim/include/usbc/tcpc_fusb302.h +++ b/zephyr/shim/include/usbc/tcpc_fusb302.h @@ -4,6 +4,7 @@ */ #include "driver/tcpm/fusb302.h" +#include "usbc/utils.h" #include <zephyr/devicetree.h> @@ -17,7 +18,13 @@ .addr_flags = DT_REG_ADDR(id), \ }, \ .drv = &fusb302_tcpm_drv, \ - .alert_signal = COND_CODE_1(DT_NODE_HAS_PROP(id, int_pin), \ - (GPIO_SIGNAL(DT_PHANDLE(id, int_pin))), \ - (GPIO_LIMIT)), \ + COND_CODE_1(CONFIG_PLATFORM_EC_TCPC_INTERRUPT, \ + (.irq_gpio = GPIO_DT_SPEC_GET_OR(id, irq_gpios, {})), \ + (.alert_signal = COND_CODE_1( \ + DT_NODE_HAS_PROP(id, int_pin), \ + (GPIO_SIGNAL(DT_PHANDLE(id, int_pin))), \ + (GPIO_LIMIT)))), \ }, + +DT_FOREACH_STATUS_OKAY(FUSB302_TCPC_COMPAT, + TCPC_VERIFY_NO_FLAGS_ACTIVE_ALERT_HIGH) |