diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-11-14 17:38:05 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-12-05 16:43:00 -0800 |
commit | f66113247a7fb0f8fcc015a50b85137d1ab044a1 (patch) | |
tree | 43baa437d00b7bf326301f2689b4222a2e36b273 /include/charge_manager.h | |
parent | 64414f92b30d3d75d0ba29fd8b32f772a16acdff (diff) | |
download | chrome-ec-f66113247a7fb0f8fcc015a50b85137d1ab044a1.tar.gz |
charge_state_v2: Limit i/p current to meet allowed MAX i/p system power
If battery is not present, input current is set to PD_MAX_CURRENT_MA.
If the input power set is greater than the maximum allowed system power,
system might get damaged. Hence, limit the input current to meet maximum
allowed input system power.
BUG=chrome-os-partner:58498
BRANCH=none
TEST=Manually tested on Reef. Removed the battery & using 'charger'
console command observed the following.
With Zinger charger at 20V - Input current is set to 2.25A
With Type-C & other chargers - Input current is set to 3A
Change-Id: Ife8686f322e095aa74b740a7c469bfe87107fb9a
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/397865
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r-- | include/charge_manager.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h index 71cc8589aa..1082883445 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -127,8 +127,10 @@ int board_set_active_charge_port(int charge_port); * @param supplier Identified CHARGE_SUPPLIER_*. * @param charge_ma Desired charge current limit, <= max_ma. * @param max_ma Maximum charge current limit, >= charge_ma. + * @param charge_mv Negotiated charge voltage (mV). */ -void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma); +void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int charge_mv); /* * Get whether the port is sourcing power on VBUS. |