diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2022-07-06 16:10:25 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-06 11:46:13 +0000 |
commit | 0412c466332ff9f8c2d5f76badae3b8203e28325 (patch) | |
tree | c52016f96669f392fc3f0b05cf9cbd852d777b41 | |
parent | a36d65a674c0326bfe8ee42bc738194095ab4437 (diff) | |
download | chrome-ec-0412c466332ff9f8c2d5f76badae3b8203e28325.tar.gz |
cherry: do not use the cached VBUS value
Ignore the cached value in case of the FRS happening and
let the cached VBUS status outdated.
BUG=b:234352018
TEST=unplug FRS hub with adapter connected, and the VBUS supplier
disappeared.
BRANCH=cherry
Change-Id: Ie87734976fc24eb1618e166d9eca0462f97d6ab8
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3747175
Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Auto-Submit: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
-rw-r--r-- | baseboard/cherry/usb_pd_policy.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/baseboard/cherry/usb_pd_policy.c b/baseboard/cherry/usb_pd_policy.c index 462fd5d3ab..160f98a6dd 100644 --- a/baseboard/cherry/usb_pd_policy.c +++ b/baseboard/cherry/usb_pd_policy.c @@ -202,16 +202,11 @@ int pd_snk_is_vbus_provided(int port) void pd_power_supply_reset(int port) { - int prev_en; - - prev_en = ppc_is_sourcing_vbus(port); - /* Disable VBUS. */ ppc_vbus_source_enable(port, 0); /* Enable discharge if we were previously sourcing 5V */ - if (prev_en) - pd_set_vbus_discharge(port, 1); + pd_set_vbus_discharge(port, 1); if (port == 1) rt1718s_gpio_set_level(port, GPIO_EN_USB_C1_5V_OUT, 0); |