diff options
author | Todd Broch <tbroch@chromium.org> | 2015-01-20 16:58:10 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-21 08:25:47 +0000 |
commit | edf0648a0a1aa0e91a8aac805ffb2fa25cf5fff7 (patch) | |
tree | 563f02847b3aa06f18770e8ab53ffd22d04d9705 | |
parent | dd57f6340ba0c8707d8857f605b9d7e390743493 (diff) | |
download | chrome-ec-edf0648a0a1aa0e91a8aac805ffb2fa25cf5fff7.tar.gz |
pd: dingdong/hoho: Disable USB Billboard on mode entry.
If UFP fails to enter mode after tAMETimeout, UFPs should advertise
there USB Billboard class. If at a later time, DFP does successfully
enter a mode the USB device should disconnect permanently.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:33968
TEST=manual,
Change UFPs response to 'discover identity' to be busy until after
tAMETimeout and see hoho enumerate (18d1:5010). Then see it
disconnect after DisplayPort mode is entered.
Change-Id: I2d72ed968302fbf74e70f76891a758c47f3773b4
Reviewed-on: https://chromium-review.googlesource.com/242148
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Duncan Laurie <dlaurie@chromium.org>
-rw-r--r-- | board/dingdong/usb_pd_policy.c | 9 | ||||
-rw-r--r-- | board/hoho/usb_pd_policy.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/board/dingdong/usb_pd_policy.c b/board/dingdong/usb_pd_policy.c index 7122bfab3d..5ac32bb7e0 100644 --- a/board/dingdong/usb_pd_policy.c +++ b/board/dingdong/usb_pd_policy.c @@ -203,7 +203,14 @@ static int svdm_enter_mode(int port, uint32_t *payload) gfu_mode = 1; rv = 1; } - /* TODO(p/33968): Enumerate USB BB here with updated mode choice */ + + if (rv) + /* + * If we failed initial mode entry we'll have enumerated the USB + * Billboard class. If so we should disconnect. + */ + usb_disconnect(); + return rv; } diff --git a/board/hoho/usb_pd_policy.c b/board/hoho/usb_pd_policy.c index 0c0dd41908..d95c40bb05 100644 --- a/board/hoho/usb_pd_policy.c +++ b/board/hoho/usb_pd_policy.c @@ -202,7 +202,14 @@ static int svdm_enter_mode(int port, uint32_t *payload) gfu_mode = 1; rv = 1; } - /* TODO(p/33968): Enumerate USB BB here with updated mode choice */ + + if (rv) + /* + * If we failed initial mode entry we'll have enumerated the USB + * Billboard class. If so we should disconnect. + */ + usb_disconnect(); + return rv; } |