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>
This commit is contained in:
parent
218fac1108
commit
bb20e42f7b
|
@ -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)
|
if (google_chromeec_command(&cmd) < 0)
|
||||||
return -1;
|
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);
|
*dbg_acc = (resp.cc_state == PD_CC_DFP_DEBUG_ACC);
|
||||||
*active_cable = !!(resp.control_flags & USB_PD_CTRL_ACTIVE_CABLE);
|
*active_cable = !!(resp.control_flags & USB_PD_CTRL_ACTIVE_CABLE);
|
||||||
*dp_mode = resp.dp_mode;
|
*dp_mode = resp.dp_mode;
|
||||||
|
|
Loading…
Reference in New Issue