diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-07-25 11:00:03 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-25 15:50:13 -0700 |
commit | 298a7276c27d1a7b6402dadfc1b0f2f45247ae2d (patch) | |
tree | 00e088f1c72de6d8aff87a023729b9f31792eeb6 /board/host/board.h | |
parent | 4231660869f6b282c5a589abb22e98681c052929 (diff) | |
download | chrome-ec-298a7276c27d1a7b6402dadfc1b0f2f45247ae2d.tar.gz |
Add turbo mode charger support, and tests for it.
Some chargers can run in a "turbo" mode, which lets it draw from the battery
to provide extra power to the AP in short bursts. In order for this to work
properly, the EC has to watch the current closely to make sure specific
limits are observed. It also has to recognize specific adapters, since those
limits vary depending on the rated power that the adapter can provide.
This adds the basic functionality, plus a test for it.
BUG=chrome-os-partner:20739
BRANCH=falco,peppy
TEST=manual
make BOARD=${BOARD} runtests
On Falco, you can also use the "adapter" EC command to see what's going on.
Try replacing the adapters and running that command to be sure they're
correctly identified, too:
> adapter
Adapter 65W (590mv), turbo 1, AP_throttled 0
>
We currently support 45W, 65W, and 90W adapters. Unknown adapters are
treated as 65W, but don't enable turbo mode.
Change-Id: I7e5407db825ce7e596cb495fb8cb4d1dd1ff639c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63372
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/host/board.h')
-rw-r--r-- | board/host/board.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/host/board.h b/board/host/board.h index fe0d29e069..f84696d58b 100644 --- a/board/host/board.h +++ b/board/host/board.h @@ -29,6 +29,11 @@ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #endif +/* Turbo-mode charger tests */ +#ifdef TEST_EXTPOWER_FALCO +#define CONFIG_EXTPOWER_FALCO +#endif + #define CONFIG_WP_ACTIVE_HIGH enum gpio_signal { @@ -50,4 +55,11 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; +enum adc_channel { + ADC_CH_CHARGER_CURRENT, + ADC_AC_ADAPTER_ID_VOLTAGE, + + ADC_CH_COUNT +}; + #endif /* __BOARD_H */ |