summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-11-09 13:29:02 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-18 04:45:52 +0000
commit040ae0f9c3eb4fbb5521b04ac08ee6ee2ece2ab8 (patch)
treedca5d7feaa4826719633f6af8149814499e45225
parent43a45decf9f18f8c4d7ce5f452c34656d0833765 (diff)
downloadchrome-ec-040ae0f9c3eb4fbb5521b04ac08ee6ee2ece2ab8.tar.gz
Revert "Rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT"
This reverts commit 9577704f30c7e824c0590264df22d95a2c706575. BUG=b:200823466 TEST=make buildall -j Change-Id: I0784c57d1bde04cb4df97993429aa9a92844d35c Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273191 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--common/host_command_pd.c2
-rw-r--r--common/pd_log.c4
-rw-r--r--include/config.h6
-rw-r--r--include/ec_commands.h2
-rw-r--r--include/usb_emsg.h2
5 files changed, 8 insertions, 8 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index 593ac335ec..3f0f83c4b2 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -139,7 +139,7 @@ static void pd_service_tcpc_ports(uint16_t port_status)
{
int i;
- for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; i++) {
+ for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; i++) {
if ((port_status & (PD_STATUS_TCPC_ALERT_0 << i)) &&
pd_is_port_enabled(i))
tcpc_alert(i);
diff --git a/common/pd_log.c b/common/pd_log.c
index 1eb5d3e3ab..b91a58762c 100644
--- a/common/pd_log.c
+++ b/common/pd_log.c
@@ -68,7 +68,7 @@ dequeue_retry:
if (r->type == PD_EVENT_NO_ENTRY) {
int i, res;
incoming_logs = 0;
- for (i = 0; i < CONFIG_USB_PD_PORT_MAX_COUNT; ++i) {
+ for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; ++i) {
/* only accessories who knows Google logging format */
if (pd_get_identity_vid(i) != USB_VID_GOOGLE)
continue;
@@ -96,7 +96,7 @@ static enum ec_status hc_pd_write_log_entry(struct host_cmd_handler_args *args)
if (type < PD_EVENT_MCU_BASE || type >= PD_EVENT_ACC_BASE)
return EC_RES_INVALID_PARAM;
- if (port > 0 && port >= CONFIG_USB_PD_PORT_MAX_COUNT)
+ if (port > 0 && port >= CONFIG_USB_PD_PORT_COUNT)
return EC_RES_INVALID_PARAM;
switch (type) {
diff --git a/include/config.h b/include/config.h
index 6d8f7c6544..0079689bc4 100644
--- a/include/config.h
+++ b/include/config.h
@@ -3671,7 +3671,7 @@
#undef CONFIG_USB_PD_LOW_POWER_IDLE_WHEN_CONNECTED
/* Number of USB PD ports */
-#undef CONFIG_USB_PD_PORT_MAX_COUNT
+#undef CONFIG_USB_PD_PORT_COUNT
/* Simple DFP, such as power adapter, will not send discovery VDM on connect */
#undef CONFIG_USB_PD_SIMPLE_DFP
@@ -4870,12 +4870,12 @@
/*
* If USB PD Discharge is enabled, verify that CONFIG_USB_PD_DISCHARGE_GPIO
- * and CONFIG_USB_PD_PORT_MAX_COUNT, CONFIG_USB_PD_DISCHARGE_TCPC, or
+ * and CONFIG_USB_PD_PORT_COUNT, CONFIG_USB_PD_DISCHARGE_TCPC, or
* CONFIG_USB_PD_DISCHARGE_PPC is defined.
*/
#ifdef CONFIG_USB_PD_DISCHARGE
#ifdef CONFIG_USB_PD_DISCHARGE_GPIO
-#if !defined(CONFIG_USB_PD_PORT_MAX_COUNT)
+#if !defined(CONFIG_USB_PD_PORT_COUNT)
#error "PD discharge port not defined"
#endif
#else
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 2cdb4df192..3ae1603194 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -5269,7 +5269,7 @@ struct ec_params_usb_pd_discovery_entry {
enum usb_pd_override_ports {
OVERRIDE_DONT_CHARGE = -2,
OVERRIDE_OFF = -1,
- /* [0, CONFIG_USB_PD_PORT_MAX_COUNT): Port# */
+ /* [0, CONFIG_USB_PD_PORT_COUNT): Port# */
};
struct ec_params_charge_port_override {
diff --git a/include/usb_emsg.h b/include/usb_emsg.h
index 7847cf6967..ffbaa93a0e 100644
--- a/include/usb_emsg.h
+++ b/include/usb_emsg.h
@@ -18,6 +18,6 @@ struct extended_msg {
};
/* Defined in usb_prl_sm.c */
-extern struct extended_msg emsg[CONFIG_USB_PD_PORT_MAX_COUNT];
+extern struct extended_msg emsg[CONFIG_USB_PD_PORT_COUNT];
#endif /* __CROS_EC_USB_EBUF_H */