summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/system.c1
-rw-r--r--driver/tcpm/tcpm.h5
-rw-r--r--include/usb_pd_tcpm.h6
3 files changed, 6 insertions, 6 deletions
diff --git a/common/system.c b/common/system.c
index 430b611174..632cc19695 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 52314151ae..0dee179e36 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -22,11 +22,6 @@
#endif
#ifndef CONFIG_USB_PD_TCPC
-#ifndef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG
-extern const struct tcpc_config_t tcpc_config[];
-#else
-extern struct tcpc_config_t tcpc_config[];
-#endif
/* 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 c256a8961f..89704737b7 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -333,6 +333,12 @@ struct tcpc_config_t {
uint32_t flags;
};
+#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.