diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2016-08-22 17:11:27 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-01 19:52:35 -0700 |
commit | 02b80c49f473b872360a782f6a95c607c6734717 (patch) | |
tree | 4c4e9b53f264b81d57206a0035a3ce8adbf323a2 /include/charge_manager.h | |
parent | f4863ef03d76fc3923c49bccdfaf28b47ddc80f9 (diff) | |
download | chrome-ec-02b80c49f473b872360a782f6a95c607c6734717.tar.gz |
pd: manage total source current available
Add a policy to handle the case where the device can source the
`CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT` over one of its type-C port if
there is no sink connected on the other ones.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:56110
TEST=manual: on Kevin, plug and unplug various devices on the 2 ports,
while measuring the type-C pull-up with Twinkie.
Change-Id: Id5961f04d0a1b1073f5ab340068efd9079918209
Reviewed-on: https://chromium-review.googlesource.com/373818
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r-- | include/charge_manager.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h index 28546e22a1..7427d12aca 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -91,6 +91,17 @@ int charge_manager_get_charger_current(void); void charge_manager_save_log(int port); #endif +/* Update whether a given port is sourcing current. */ +void charge_manager_source_port(int port, int enable); + +/* + * Get PD source power data objects. + * + * @param src_pdo pointer to the data to return. + * @return number of PDOs returned. + */ +int charge_manager_get_source_pdo(const uint32_t **src_pdo); + /* Board-level callback functions */ /* |