diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2016-01-27 11:43:05 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-02 23:48:33 -0800 |
commit | 33fe5e437da4233f6a716c6eab2f44620efef1d7 (patch) | |
tree | 3f5260943b0f1a9ec4fa25b5d9909f5ff59bdfd3 /include/charge_manager.h | |
parent | 0c50cae42e40911428899131fbca54dcfd565da7 (diff) | |
download | chrome-ec-33fe5e437da4233f6a716c6eab2f44620efef1d7.tar.gz |
charger/Kunimitsu: Fix for boot from cut-off battery
Battery in cut-off mode wakes when voltage is applied to the PACK
and takes approximately 2 to 3 seconds to initialize before capable
of providing the power. Hence made the battery present status to
BP_NO in case of cut-off mode. Once the battery is ready new status
is updated as BP_YES.
When the battery status changes from BP_NO to BP_YES, charger input
current is set to board specific charger input current which is not
sufficient to boot the AP hence the system reboots. To avoid this
issue, added code to write charger manager negotiated current to
charger input current when the battery status changes from BP_NO to
BP_YES.
BRANCH=none
BUG=chrome-os-partner:49224
TEST=Manually tested on Kunimitsu.
Used console command 'cutoff' to put the battery in cut-off mode.
Inserted the adopter to wake the system, system doesn't reboot &
the battery charges.
Change-Id: Ia5a1457506b4bef0b3dd27993e4b60ae64c8f746
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/322430
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r-- | include/charge_manager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h index d3f14117b5..a47bf3a4d7 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -77,6 +77,9 @@ int charge_manager_get_active_charge_port(void); /* Return the power limit (uW) set by charge manager. */ int charge_manager_get_power_limit_uw(void); +/* Return the charger current (mA) value. */ +int charge_manager_get_charger_current(void); + #ifdef CONFIG_USB_PD_LOGGING /* Save power state log entry for the given port */ void charge_manager_save_log(int port); |