diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2014-10-09 18:45:34 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-15 18:22:44 +0000 |
commit | b8f73a451d9f0e62aba43dab1184bc1352ee968f (patch) | |
tree | 8054a2e14e9041468db21e19d51b709ebf47a9b6 /Makefile | |
parent | bcc5057ad30a1252e7ae994dee58a689c210e302 (diff) | |
download | chrome-ec-b8f73a451d9f0e62aba43dab1184bc1352ee968f.tar.gz |
charge_manager: Add module for managing battery charge limits
charge_manager is intended to manage charge limits from various tasks
(typically PD charge tasks and USB / BC 1.2 charge tasks). These tasks
can update the charge limit of a port by calling charge_manager_update
(thread-safe function). If the charge limit has changed,
charge_manager_refresh will be queued as a deferred task, which will
select the "best" charge port and set the proper charge limit.
In order to use charge_manager, a board needs to do the following:
1. Declare PD_PORT_COUNT in usb_pd_config.h
2. Implement board_set_charge_limit
3. Implement board_set_active_charge_port
4. Call charge_manager_update whenever the available charge on a port changes.
BUG=chrome-os-partner:31361
TEST=Manual on samus_pd, with subsequent commit. Insert and remove
various chargers, check console to verify PD charger always has priority
and correct current limit is set based upon 'best' charger.
BRANCH=samus
Change-Id: Iede120b69e0b46ed329bcf9b7e07c39ba5e9f77b
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222723
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions