summaryrefslogtreecommitdiff
path: root/common/usbc
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-06-29 12:06:49 -0600
committerCommit Bot <commit-bot@chromium.org>2020-07-07 04:05:12 +0000
commitf0d151d101034f9a1d14fdb29fa887d0d3e4a973 (patch)
tree71a20537ad13a74a4ee53ec1ed2667fe98ea2710 /common/usbc
parent47a4f56d643be2fdafc2fef171995faa3dbd5105 (diff)
downloadchrome-ec-f0d151d101034f9a1d14fdb29fa887d0d3e4a973.tar.gz
tcpmv2: make prints consistent
Use the same prefix for all debug statements, namely C#: BRANCH=none BUG=none TEST=build Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Iaa1524dfc1f8a9136259b6193b99e8d2229925f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276316 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/usbc')
-rw-r--r--common/usbc/usb_pe_drp_sm.c2
-rw-r--r--common/usbc/usb_prl_sm.c2
-rw-r--r--common/usbc/usb_tc_ctvpd_sm.c6
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c18
-rw-r--r--common/usbc/usb_tc_vpd_sm.c6
5 files changed, 17 insertions, 17 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index 0e5605ddec..4883f7e71f 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -1281,7 +1281,7 @@ static void pe_send_request_msg(int port)
pd_build_request(pe[port].vpd_vdo, &rdo, &curr_limit,
&supply_voltage, port);
- CPRINTF("C%d Req [%d] %dmV %dmA", port, RDO_POS(rdo),
+ CPRINTF("C%d: Req [%d] %dmV %dmA", port, RDO_POS(rdo),
supply_voltage, curr_limit);
if (rdo & RDO_CAP_MISMATCH)
CPRINTF(" Mismatch");
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index 659e5f2cdc..4fa01ad1dc 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -1993,7 +1993,7 @@ static void prl_rx_wait_for_phy_message(const int port, int evt)
prl_debug_level >= DEBUG_LEVEL_3) {
int p;
- ccprintf("C%d RECV %04x/%d ", port, header, cnt);
+ ccprintf("C%d: RECV %04x/%d ", port, header, cnt);
for (p = 0; p < cnt; p++)
ccprintf("[%d]%08x ", p, pdmsg[port].rx_chk_buf[p]);
ccprintf("\n");
diff --git a/common/usbc/usb_tc_ctvpd_sm.c b/common/usbc/usb_tc_ctvpd_sm.c
index 5c0e2d78cf..596f14a760 100644
--- a/common/usbc/usb_tc_ctvpd_sm.c
+++ b/common/usbc/usb_tc_ctvpd_sm.c
@@ -196,7 +196,7 @@ void tc_state_init(int port)
res = tc_restart_tcpc(port);
- CPRINTS("TCPC p%d init %s", port, res ? "failed" : "ready");
+ CPRINTS("C%d: init %s", port, res ? "failed" : "ready");
/* Disable if restart failed, otherwise start in default state. */
set_state_tc(port, res ? TC_DISABLED : TC_UNATTACHED_SNK);
@@ -278,12 +278,12 @@ static void tc_disabled_exit(const int port)
{
if (!IS_ENABLED(CONFIG_USB_PD_TCPC)) {
if (tc_restart_tcpc(port) != 0) {
- CPRINTS("TCPC p%d restart failed!", port);
+ CPRINTS("C%d: restart failed!", port);
return;
}
}
- CPRINTS("TCPC p%d resumed!", port);
+ CPRINTS("C%d: resumed!", port);
}
/**
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index f4cb513eb5..fd3beb79ff 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -846,7 +846,7 @@ void pd_set_suspend(int port, int suspend)
/* Sleep this task if we are not suspended */
while (pd_is_port_enabled(port)) {
if (++wait > SUSPEND_SLEEP_RETRIES) {
- CPRINTS("P%d: NOT SUSPENDED after %dms",
+ CPRINTS("C%d: NOT SUSPENDED after %dms",
port, wait * SUSPEND_SLEEP_DELAY);
return;
}
@@ -1144,7 +1144,7 @@ static void restart_tc_sm(int port, enum usb_tc_state start_state)
res = tc_restart_tcpc(port);
- CPRINTS("TCPC p%d init %s", port, res ? "failed" : "ready");
+ CPRINTS("C%d: TCPC init %s", port, res ? "failed" : "ready");
/* Disable if restart failed, otherwise start in default state. */
set_state_tc(port, res ? TC_DISABLED : start_state);
@@ -1582,9 +1582,9 @@ static __maybe_unused int reset_device_and_notify(int port)
tc_start_event_loop(port);
if (rv == EC_SUCCESS)
- CPRINTS("TCPC p%d init ready", port);
+ CPRINTS("C%d: TCPC init ready", port);
else
- CPRINTS("TCPC p%d init failed!", port);
+ CPRINTS("C%d: TCPC init failed!", port);
/*
* Before getting the other tasks that are waiting, clear the reset
@@ -1746,12 +1746,12 @@ static void tc_disabled_exit(const int port)
{
if (!IS_ENABLED(CONFIG_USB_PD_TCPC)) {
if (tc_restart_tcpc(port) != 0) {
- CPRINTS("TCPC p%d restart failed!", port);
+ CPRINTS("C%d: TCPC restart failed!", port);
return;
}
}
- CPRINTS("TCPC p%d resumed!", port);
+ CPRINTS("C%d: TCPC resumed!", port);
}
/**
@@ -2800,7 +2800,7 @@ static __maybe_unused void check_drp_connection(const int port)
#endif
default:
- CPRINTS("Error: DRP next state %d", next_state);
+ CPRINTS("C%d: Error: DRP next state %d", port, next_state);
break;
}
}
@@ -2845,7 +2845,7 @@ static void tc_low_power_mode_run(const int port)
tc[port].low_power_exit_time = now
+ PD_LPM_EXIT_DEBOUNCE_US;
} else if (now > tc[port].low_power_exit_time) {
- CPRINTS("TCPC p%d Exit Low Power Mode", port);
+ CPRINTS("C%d: Exit Low Power Mode", port);
check_drp_connection(port);
}
return;
@@ -2855,7 +2855,7 @@ static void tc_low_power_mode_run(const int port)
tc[port].low_power_time = get_time().val + PD_LPM_DEBOUNCE_US;
if (get_time().val > tc[port].low_power_time) {
- CPRINTS("TCPC p%d Enter Low Power Mode", port);
+ CPRINTS("C%d: TCPC Enter Low Power Mode", port);
TC_SET_FLAG(port, TC_FLAGS_LPM_ENGAGED);
TC_SET_FLAG(port, TC_FLAGS_LPM_TRANSITION);
tcpm_enter_low_power_mode(port);
diff --git a/common/usbc/usb_tc_vpd_sm.c b/common/usbc/usb_tc_vpd_sm.c
index b549141e3e..3e1141c10a 100644
--- a/common/usbc/usb_tc_vpd_sm.c
+++ b/common/usbc/usb_tc_vpd_sm.c
@@ -101,7 +101,7 @@ void tc_state_init(int port)
res = tc_restart_tcpc(port);
- CPRINTS("TCPC p%d init %s", port, res ? "failed" : "ready");
+ CPRINTS("C%d: init %s", port, res ? "failed" : "ready");
/* Disable TCPC RX until connection is established */
tcpm_set_rx_enable(port, 0);
@@ -191,12 +191,12 @@ static void tc_disabled_exit(const int port)
{
if (!IS_ENABLED(CONFIG_USB_PD_TCPC)) {
if (tc_restart_tcpc(port) != 0) {
- CPRINTS("TCPC p%d restart failed!", port);
+ CPRINTS("C%d: restart failed!", port);
return;
}
}
- CPRINTS("TCPC p%d resumed!", port);
+ CPRINTS("C%d: resumed!", port);
}
/**