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>
This commit is contained in:
Randall Spangler
2013-06-13 10:45:28 -07:00
committed by ChromeBot
parent c09f37cf09
commit d46ea680f7
2 changed files with 4 additions and 3 deletions

View File

@@ -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},

View File

@@ -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,