diff options
author | Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com> | 2022-08-29 15:43:01 +0800 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-09-05 14:06:16 +0000 |
commit | bb20e42f7b27bf9edaacc983978d4648fba702bb (patch) | |
tree | 4cd6d029e9fe8b9b8bb9f249c7bbe683fe051643 /src/ec/google | |
parent | 218fac11087d3c1ad69327e4e926ab7ba5a6465f (diff) |
ec/google/chromeec: Modify ufp from type-c role
In order to fix the USB port of type-C dongle has no function after
reboot/shutdown, modify ufp which is in google_chromeec_usb_pd_get_info
from the bit1 of type-c role (PD_CTRL_RESP_ROLE_DATA).
BUG=b:239138412
TEST=Built coreboot image and verified that using this patch can detect
usb drive after reboot.
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I73a4a6ec37129388783599125f067068d155d93f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67168
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 6604abd49e..7ee2300f1e 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -1462,7 +1462,7 @@ static int google_chromeec_usb_pd_get_info(int port, bool *ufp, bool *dbg_acc, if (google_chromeec_command(&cmd) < 0) return -1; - *ufp = (resp.cc_state == PD_CC_DFP_ATTACHED); + *ufp = !(resp.role & PD_CTRL_RESP_ROLE_DATA); *dbg_acc = (resp.cc_state == PD_CC_DFP_DEBUG_ACC); *active_cable = !!(resp.control_flags & USB_PD_CTRL_ACTIVE_CABLE); *dp_mode = resp.dp_mode; |