diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2014-10-28 09:20:18 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-13 00:29:52 +0000 |
commit | 06fb4fe0f2ee33c912fa10ed7fecdbe8c9c193d6 (patch) | |
tree | 2da534db21eb2895df5fc052e007abfb734cf788 /include/charge_manager.h | |
parent | 27367a07c923c778941a5c1a0635e1694d51030a (diff) | |
download | chrome-ec-06fb4fe0f2ee33c912fa10ed7fecdbe8c9c193d6.tar.gz |
usb_pd: Negotiate minimum power for unused ports
When a PD charger is detected, gets its max charge capability, but
initially negotiate for its minimum charge mode. If we later determine
that the port will be the one active charge port, re-negotiate for the
max charge capability.
BUG=chrome-os-partner:32003
TEST=Manual on Samus. Plug in Zinger, verify that current limit is
initially set to 500 mA, then switches to 3000 mA shortly after. Plug in
two Zingers, verify that one provides 3000 mA current while the other
negotiates to 500 mA. Verify that the 500 mA charger bumps up to a high
current once becoming active.
BRANCH=Samus
Change-Id: Ifa562b72d763642fc8bd62bc7f5aaa4eda1ef950
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/225922
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r-- | include/charge_manager.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h index 44ed605a23..d32436ab81 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -9,6 +9,7 @@ /* Charge port that indicates no active port */ #define CHARGE_SUPPLIER_NONE -1 #define CHARGE_PORT_NONE -1 +#define CHARGE_CEIL_NONE -1 /* Initial charge state */ #define CHARGE_CURRENT_UNINITIALIZED -1 @@ -27,4 +28,10 @@ void charge_manager_update(int supplier, int charge_port, struct charge_port_info *charge); +/* Update charge ceiling for a given port */ +void charge_manager_set_ceil(int port, int ceil); + +/* Returns the current active charge port, as determined by charge manager */ +int charge_manager_get_active_charge_port(void); + #endif /* __CHARGE_MANAGER_H */ |