diff options
author | Scott Collyer <scollyer@google.com> | 2019-08-07 14:36:02 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-09 00:16:44 +0000 |
commit | 21ef952c1234d12894a3980c700f934850b434e9 (patch) | |
tree | e0aa3820294ae3c8bd9cc9ff2f93eb9a8dbaf84b /driver/bc12 | |
parent | 4923a80456d22564077f8d0ddda736147780af92 (diff) | |
download | chrome-ec-21ef952c1234d12894a3980c700f934850b434e9.tar.gz |
pi3usb9201: Add EC console log for host CDP mode setting
For the pi3usb9201 the usb D+/D- switches are closed automatically
based on either the result of bc1.2 client detection completion or
setting CDP_HOST mode. There is a console log already that shows the
bc1.2 client mode detection result. However, for host mode there was
no console log. This CL adds a message when this setting is used which
is useful for knowing for certain that the D+/D- switches have been
closed.
BUG=b:138618816
BRANCH=none
TEST=Verfied message when data role is DFP
2019-08-07 14:32:40 [0.716611 pi3usb9201[p0]: CDP_HOST mode]
Change-Id: I65a6321452a8e668c839eba7a18d92398c2b78d1
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1742869
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'driver/bc12')
-rw-r--r-- | driver/bc12/pi3usb9201.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/bc12/pi3usb9201.c b/driver/bc12/pi3usb9201.c index 08ed7baa6e..0facefdced 100644 --- a/driver/bc12/pi3usb9201.c +++ b/driver/bc12/pi3usb9201.c @@ -320,9 +320,11 @@ void usb_charger_task(void *u) */ bc12_power_up(port); rv = pi3usb9201_get_mode(port, &mode); - if (!rv && (mode != PI3USB9201_CDP_HOST_MODE)) + if (!rv && (mode != PI3USB9201_CDP_HOST_MODE)) { + CPRINTS("pi3usb9201[p%d]: CDP_HOST mode", port); pi3usb9201_set_mode(port, PI3USB9201_CDP_HOST_MODE); + } } if (evt & USB_CHG_EVENT_CC_OPEN) |