diff options
author | Rong Chang <rongchang@chromium.org> | 2012-08-15 04:48:34 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-16 03:36:19 -0700 |
commit | cebbe4c0e708be36140c8c0fdce45a106f824650 (patch) | |
tree | 365ddbf198f5b87046241d7607e0af928e755602 /board | |
parent | 9c45a309b9d462358dfecd4713340ea23d9f12f2 (diff) | |
download | chrome-ec-cebbe4c0e708be36140c8c0fdce45a106f824650.tar.gz |
daisy: Modify charging flow to comply charging specification
This change corrects charger interrupt event handling, charger enable
gpio, battery full condition, EC deep sleep mode support when AC
unplugged, and lid controlled power off.
Signed-off-by: Rong Chang <rongchang@chromium.org>
BRANCH=snow
BUG=chrome-os-partner:12573,12574,12575
TEST=manual
- ec console command 'gpioget':
- SPI1_MISO should be 0 when AP off
- CHARGER_EN should be 0 after AC unplugged
- charging led should be off after AC unplugged
- when battery remaining charge < 3%, system should be powered off
without AC.
- ec console command 'sleepmask 0', turn off AP:
- deep sleep only when AC unplugged
Change-Id: I0f63835dae67d90de7a8c8c6c3537ca9a16faed4
Reviewed-on: https://gerrit.chromium.org/gerrit/30316
Commit-Ready: Rong Chang <rongchang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/snow/board.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/board/snow/board.c b/board/snow/board.c index bf9aa71c98..50fcdfd04c 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -219,9 +219,12 @@ int board_i2c_claim(int port) void board_i2c_release(int port) { if (port == I2C_PORT_HOST) { - /* Release our claim */ - gpio_set_level(GPIO_EC_CLAIM, 1); - usleep(BUS_SLEW_DELAY_US); + /* Release our claim when AP is on */ + if (!chipset_in_state(CHIPSET_STATE_ANY_OFF | + CHIPSET_STATE_SUSPEND)) { + gpio_set_level(GPIO_EC_CLAIM, 1); + usleep(BUS_SLEW_DELAY_US); + } } } #endif /* CONFIG_ARBITRATE_I2C */ |