summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-06-13 10:45:28 -0700
committerChromeBot <chrome-bot@google.com>2013-06-13 12:51:08 -0700
commitd46ea680f7ca69dc13c91c10e83c6f61190ef159 (patch)
treeda8d18f85040f90bd6c60812f2a065e407988482
parentc09f37cf09adb1150d1ec3b8282f1e91bad4b8ad (diff)
downloadchrome-ec-d46ea680f7ca69dc13c91c10e83c6f61190ef159.tar.gz
pit: AC detect signal is a simple GPIO now
Frank's reworks turn AC_PWRBTN_L from a signal which co-mingled AC-detect and pwower button press to a straight AC detect signal. Switch from the hacky snow version of extpower to the simple gpio version. BUG=chrome-os-partner:20034 BRANCH=none TEST=manual, using gpioget command 1. With AC plugged in, AC_PRESENT=1 2. Press power button. Still AC_PRESENT=1 3. Unplug AC, AC_PRESENT=0 4. Press power button. Still AC_PRESENT=0 Change-Id: I35df4ba80d0003310f3e01d9815158cfa3d0cb51 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58550 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--board/pit/board.c3
-rw-r--r--board/pit/board.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/board/pit/board.c b/board/pit/board.c
index 7bd796f207..8e3608b5c6 100644
--- a/board/pit/board.c
+++ b/board/pit/board.c
@@ -5,6 +5,7 @@
/* Pit board-specific configuration */
#include "common.h"
+#include "extpower.h"
#include "gaia_power.h"
#include "gpio.h"
#include "i2c.h"
@@ -30,6 +31,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"SUSPEND_L", GPIO_C, (1<<7), GPIO_INT_BOTH, gaia_suspend_event},
{"SPI1_NSS", GPIO_A, (1<<4), GPIO_INT_BOTH | GPIO_PULL_UP,
spi_event},
+ {"AC_PRESENT", GPIO_A, (1<<0), GPIO_INT_BOTH, extpower_interrupt},
{"KB_IN00", GPIO_C, (1<<8), GPIO_KB_INPUT,
keyboard_raw_gpio_interrupt},
{"KB_IN01", GPIO_C, (1<<9), GPIO_KB_INPUT,
@@ -47,7 +49,6 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
{"KB_IN07", GPIO_D, (1<<2), GPIO_KB_INPUT,
keyboard_raw_gpio_interrupt},
/* Other inputs */
- {"AC_PWRBTN_L", GPIO_A, (1<<0), GPIO_INT_BOTH, NULL},
{"WP_L", GPIO_B, (1<<4), GPIO_INPUT, NULL},
/* Outputs */
{"AP_RESET_L", GPIO_B, (1<<3), GPIO_HI_Z, NULL},
diff --git a/board/pit/board.h b/board/pit/board.h
index 88a31f289d..ba6a4df593 100644
--- a/board/pit/board.h
+++ b/board/pit/board.h
@@ -30,7 +30,7 @@
#define CONFIG_CHIPSET_GAIA
#endif
#define CONFIG_CMD_PMU
-#define CONFIG_EXTPOWER_SNOW
+#define CONFIG_EXTPOWER_GPIO
#define CONFIG_HOST_COMMAND_STATUS
#define CONFIG_I2C
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
@@ -86,6 +86,7 @@ enum gpio_signal {
GPIO_LID_OPEN,
GPIO_SUSPEND_L,
GPIO_SPI1_NSS,
+ GPIO_AC_PRESENT,
/* Keyboard inputs */
GPIO_KB_IN00,
GPIO_KB_IN01,
@@ -96,7 +97,6 @@ enum gpio_signal {
GPIO_KB_IN06,
GPIO_KB_IN07,
/* Other inputs */
- GPIO_AC_PWRBTN_L,
GPIO_WP_L,
/* Outputs */
GPIO_AP_RESET_L,