diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-06-08 13:58:47 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-10 19:48:08 +0000 |
commit | e05ed041cfe60db7d1bff5424d4579a52aea402f (patch) | |
tree | 1fd7a6e78c42682b1f9eb331c12084a4b44c3b56 /include/charge_manager.h | |
parent | 5d7c4f0cd6b7b020e70c9f9ec5f60a8457b90f12 (diff) | |
download | chrome-ec-e05ed041cfe60db7d1bff5424d4579a52aea402f.tar.gz |
charger: Move USB charger / BC1.2 task to common code
Move the task responsible for detection of USB chargers to common code
to reduce code duplication.
BUG=chrome-os-partner:40920
TEST=Manual on samus_pd. Plug USB charger, verify detection is correct
on both charge ports.
BRANCH=None
Change-Id: I362f8b5b51741509e459c66928131f1f6d2a3b1d
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/276210
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/charge_manager.h')
-rw-r--r-- | include/charge_manager.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/charge_manager.h b/include/charge_manager.h index 6654542667..d1bd840a9e 100644 --- a/include/charge_manager.h +++ b/include/charge_manager.h @@ -17,6 +17,21 @@ #define CHARGE_CURRENT_UNINITIALIZED -1 #define CHARGE_VOLTAGE_UNINITIALIZED -1 +#define USB_BC12_CHARGE_VOLTAGE 5000 /* mV */ + +/* Commonly-used charge suppliers listed in no particular order */ +enum charge_supplier { + CHARGE_SUPPLIER_PD, + CHARGE_SUPPLIER_TYPEC, + CHARGE_SUPPLIER_BC12_DCP, + CHARGE_SUPPLIER_BC12_CDP, + CHARGE_SUPPLIER_BC12_SDP, + CHARGE_SUPPLIER_PROPRIETARY, + CHARGE_SUPPLIER_OTHER, + CHARGE_SUPPLIER_VBUS, + CHARGE_SUPPLIER_COUNT +}; + /* Charge tasks report available current and voltage */ struct charge_port_info { int current; |