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 /board/oak | |
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 'board/oak')
-rw-r--r-- | board/oak/board.c | 14 | ||||
-rw-r--r-- | board/oak/board.h | 16 |
2 files changed, 0 insertions, 30 deletions
diff --git a/board/oak/board.c b/board/oak/board.c index f4fc84918c..1877c7c0c7 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -40,7 +40,6 @@ /* Default input current limit when VBUS is present */ #define DEFAULT_CURR_LIMIT 500 /* mA */ -#define USB_BC12_CHARGE_VOLTAGE 5000 /* mV */ static void ap_reset_deferred(void) { @@ -109,19 +108,6 @@ const struct i2c_port_t i2c_ports[] = { const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -/* Charge supplier priority: lower number indicates higher priority. */ -const int supplier_priority[] = { - [CHARGE_SUPPLIER_PD] = 0, - [CHARGE_SUPPLIER_TYPEC] = 1, - [CHARGE_SUPPLIER_PROPRIETARY] = 1, - [CHARGE_SUPPLIER_BC12_DCP] = 1, - [CHARGE_SUPPLIER_BC12_CDP] = 2, - [CHARGE_SUPPLIER_BC12_SDP] = 3, - [CHARGE_SUPPLIER_OTHER] = 3, - [CHARGE_SUPPLIER_VBUS] = 4 -}; -BUILD_ASSERT(ARRAY_SIZE(supplier_priority) == CHARGE_SUPPLIER_COUNT); - static int discharging_on_ac; /** diff --git a/board/oak/board.h b/board/oak/board.h index c4745c4d69..e00ce7be50 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -138,22 +138,6 @@ enum adc_channel { ADC_CH_COUNT }; -/* Charge suppliers */ -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 -}; - -/* supplier_priority table defined in board.c */ -extern const int supplier_priority[]; - /* start as a sink in case we have no other power supply/battery */ #define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED |