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 09:52:56 +0000 |
commit | c5fa16ae5fadac9aa5b3bb5e36e304ab9335317b (patch) | |
tree | 6633dee7397b03a5e237df0002722b7c53476c8c /baseboard | |
parent | 54de8d24958a253298eaa4551f2c2474a94d1650 (diff) | |
download | chrome-ec-c5fa16ae5fadac9aa5b3bb5e36e304ab9335317b.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/+/3747171
Auto-Submit: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'baseboard')
-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 6aa3eb0909..a6badfb160 100644 --- a/baseboard/cherry/usb_pd_policy.c +++ b/baseboard/cherry/usb_pd_policy.c @@ -203,16 +203,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); |