From 652fdd9e805dafb9eafb0289d3304926c6151bb4 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Fri, 8 May 2020 16:01:56 -0600 Subject: Waddledee: Use cached Vbus presence Convert pd_snk_is_vbus_provided() to return the cached Vbus presence from the charger driver. BRANCH=None BUG=None TEST=on waddledee, confirm charger and powered dongle can connect to both ports Signed-off-by: Diana Z Change-Id: If45956072f41f8a20e5880825e687230ef239a1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2191375 Reviewed-by: Aseda Aboagye --- board/waddledee/usb_pd_policy.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/board/waddledee/usb_pd_policy.c b/board/waddledee/usb_pd_policy.c index 1611af23e0..0fc682b28e 100644 --- a/board/waddledee/usb_pd_policy.c +++ b/board/waddledee/usb_pd_policy.c @@ -76,9 +76,5 @@ int pd_set_power_supply_ready(int port) int pd_snk_is_vbus_provided(int port) { - int chg_det = 0; - - sm5803_get_chg_det(port, &chg_det); - - return chg_det; + return sm5803_is_vbus_present(port); } -- cgit v1.2.1