diff options
author | Jett Rink <jettrink@chromium.org> | 2018-04-03 18:50:03 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-10 19:12:55 -0700 |
commit | be6a26363871acb3529a30cdcb4189135a372bd7 (patch) | |
tree | 94bd53eb1af91d704b5b4afe03b2308559a331a0 /include | |
parent | db8d6edf26ba3f78bbab2bcda7a98e249331b8c1 (diff) | |
download | chrome-ec-be6a26363871acb3529a30cdcb4189135a372bd7.tar.gz |
usb_charger: initialize VBUS supplier at startup
When using VBUS_DETECT_TCPC the charger code relied on the TCPC
alert to initialize the VBUS supply, but that happens too late in
board startup sequence to allow an initally plugged in USB-C power
supply to be chosen as the active charging port.
We can and should initialize the the supplier sooner as to prevent
the charge_manager_is_seeded() check from failing thus preventing
the board from choosing a charging port.
BRANCH=none
BUG=b:77458917
TEST=PS8751 on yorp will negotiate 20V over USB-C (which was prevent
by the charge_manager not being seeded)
Change-Id: I6f612c508932a90ece0036ce8310a20de02d8467
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/994707
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index ac3d16cbc5..d9299a7f26 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1746,6 +1746,13 @@ int pd_ts_dts_plugged(int port); */ int pd_capable(int port); +/** + * Return true if vbus is present on the specified port. + * + * @param port USB-C port number + */ +int pd_is_vbus_present(int port); + /* ----- Logging ----- */ #ifdef CONFIG_USB_PD_LOGGING /** |