summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/system.c1
-rw-r--r--driver/tcpm/tcpm.h1
-rw-r--r--include/usb_pd_tcpm.h6
3 files changed, 6 insertions, 2 deletions
diff --git a/common/system.c b/common/system.c
index c9b38601a4..c1c5d7c995 100644
--- a/common/system.c
+++ b/common/system.c
@@ -353,7 +353,6 @@ const uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size)
#if defined(CONFIG_USB_POWER_DELIVERY) && !defined(CONFIG_USB_PD_TCPM_STUB) && \
defined(CONFIG_I2C_MASTER)
-extern const struct tcpc_config_t tcpc_config[];
static void system_protect_tcpc_i2c_ports(void)
{
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h
index 66792d34c8..0dee179e36 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -22,7 +22,6 @@
#endif
#ifndef CONFIG_USB_PD_TCPC
-extern const struct tcpc_config_t tcpc_config[];
/* I2C wrapper functions - get I2C port / slave addr from config struct. */
#ifndef CONFIG_USB_PD_TCPC_LOW_POWER
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 2a9778c3dd..c1e8eb57aa 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -327,6 +327,12 @@ struct tcpc_config_t {
enum tcpc_alert_open_drain od;
};
+#ifndef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
+extern const struct tcpc_config_t tcpc_config[];
+#else
+extern struct tcpc_config_t tcpc_config[];
+#endif
+
/**
* Returns the PD_STATUS_TCPC_ALERT_* mask corresponding to the TCPC ports
* that are currently asserting ALERT.