diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-05-16 14:09:12 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-23 00:12:21 +0000 |
commit | 0eb8ccab6051b6e887ae13dde7260f315da4fabe (patch) | |
tree | 410a6b0a3c97323d90ef0007c9820511746c55dc | |
parent | 0237cc790983b9fa4159963ec6ee2feab5a7f512 (diff) | |
download | chrome-ec-0eb8ccab6051b6e887ae13dde7260f315da4fabe.tar.gz |
USB-PD: Consolidate tcpc_config declarations in usb_pd_tcpm.h
Currently, tcpc_config is declared in two places. This patch
consolidates declarations in usb_pd_tcpm.h.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=buildall
Change-Id: I4f30d06b1eaeb6a83b664de76116d85d65a9fc97
Reviewed-on: https://chromium-review.googlesource.com/1616007
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1767515
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | common/system.c | 1 | ||||
-rw-r--r-- | driver/tcpm/tcpm.h | 5 | ||||
-rw-r--r-- | include/usb_pd_tcpm.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/common/system.c b/common/system.c index ab22c2b972..2f679dcd9e 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 b2c2ab8638..f2914bba4e 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -328,6 +328,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. |