diff options
author | Simon Que <sque@chromium.org> | 2012-08-09 10:51:39 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-14 17:04:50 -0700 |
commit | 1178484e0e728ab123b8bf3433624c92936b7229 (patch) | |
tree | 929bc04c58c5a114877e63efe88a1363cc887dfb /board/snow | |
parent | 6bbddfbfb85ed31b2b821ef1cb3077faf8d1dc44 (diff) | |
download | chrome-ec-1178484e0e728ab123b8bf3433624c92936b7229.tar.gz |
Handle IRQ from TPS65090, pass AC status to AP
Changes made by this patch:
1. Create IRQ handler for the TPS65090 IRQ. IRQ wakes up charger task.
2. Charger task sets the AC_STATUS GPIO based on the AC status.
3. Initialize PMU at power-on.
BRANCH=snow
BUG=chrome-os-partner:11739
TEST=Power on the system, with servo v2 connected to EC console. Plug
and unplug AC. The IRQ handler should be triggered.
Change-Id: Ice23411c275111fdb56d2c47ba28c3c44dee4d71
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29914
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/snow')
-rw-r--r-- | board/snow/board.c | 3 | ||||
-rw-r--r-- | board/snow/board.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/board/snow/board.c b/board/snow/board.c index 8359f25c7e..bf9aa71c98 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -40,7 +40,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = { {"KB_PWR_ON_L", GPIO_B, (1<<5), GPIO_INT_BOTH, gaia_power_event}, {"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, gaia_power_event}, {"XPSHOLD", GPIO_A, (1<<3), GPIO_INT_RISING, gaia_power_event}, - {"CHARGER_INT", GPIO_C, (1<<4), GPIO_INT_RISING, NULL}, + {"CHARGER_INT", GPIO_C, (1<<4), GPIO_INT_FALLING, pmu_irq_handler}, {"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_RISING, gaia_lid_event}, {"SUSPEND_L", GPIO_A, (1<<7), GPIO_INT_BOTH, gaia_suspend_event}, {"WP_L", GPIO_B, (1<<4), GPIO_INPUT, NULL}, @@ -57,6 +57,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = { {"SPI1_NSS", GPIO_A, (1<<4), GPIO_PULL_UP, NULL}, /* Outputs */ + {"AC_STATUS", GPIO_A, (1<<5), GPIO_OUT_HIGH, NULL}, {"SPI1_MISO", GPIO_A, (1<<6), GPIO_OUT_HIGH, NULL}, {"EN_PP1350", GPIO_A, (1<<2), GPIO_OUT_LOW, NULL}, {"EN_PP5000", GPIO_A, (1<<11), GPIO_OUT_LOW, NULL}, diff --git a/board/snow/board.h b/board/snow/board.h index 2e72250b34..c7ecae04e7 100644 --- a/board/snow/board.h +++ b/board/snow/board.h @@ -77,6 +77,7 @@ enum gpio_signal { GPIO_AC_PWRBTN_L, GPIO_SPI1_NSS, /* Outputs */ + GPIO_AC_STATUS, GPIO_SPI1_MISO, GPIO_EN_PP1350, /* DDR 1.35v rail enable */ GPIO_EN_PP5000, /* 5.0v rail enable */ |