diff options
author | Keith Short <keithshort@chromium.org> | 2020-11-03 13:52:43 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-04 00:05:46 +0000 |
commit | 238b1debc771468db6dbe605e9aed6af2fc00d56 (patch) | |
tree | 0b5c5a86387b96e6dbc94462b33716e9df40dd8e /common/usb_pd_dual_role.c | |
parent | 3b96973d29dd794cce7d7a32d16e2f531b97203a (diff) | |
download | chrome-ec-238b1debc771468db6dbe605e9aed6af2fc00d56.tar.gz |
tcpmv2: Move "Allow_List" print to USBPD channel
Move the allow_list not found message from the CONSOLE to the USBPD
channel. This allows the message to be disabled during tests.
BUG=none
BRANCH=none
TEST=make buildall
TEST=Run "chan 0" and connect a charger that isn't in the allow list to
volteer.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I395a701ee955200ad183dcb7da64d662d3611a4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518730
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/usb_pd_dual_role.c')
-rw-r--r-- | common/usb_pd_dual_role.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/usb_pd_dual_role.c b/common/usb_pd_dual_role.c index 52b7cdd4e1..5d516cc7d9 100644 --- a/common/usb_pd_dual_role.c +++ b/common/usb_pd_dual_role.c @@ -12,6 +12,8 @@ #include "usb_pd.h" #include "util.h" +#define CPRINTS(format, args...) cprints(CC_USBPD, format, ## args) + #if defined(PD_MAX_VOLTAGE_MV) && defined(PD_OPERATING_POWER_MW) /* * As a sink, this is the max voltage (in millivolts) we can request @@ -371,7 +373,7 @@ int pd_charge_from_device(uint16_t vid, uint16_t pid) pid == allow_list[i].pid) return 1; } - ccprints("Allow_List pair not found: vid=0x%X pid=0x%X", vid, pid); + CPRINTS("allow_list[] pair not found: vid=0x%X pid=0x%X", vid, pid); return 0; } |