mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 02:20:48 +00:00
reef: Enable external power interrupt GPIO
BUG=chrome-os-partner:54503
BRANCH=none
TEST=Manually tested using console commands on both the ports.
a. Issued 'gpioget AC_PRESENT', observed AC_PRESENT is
1 when AC connected & 0 when AC disconnected.
b. Issued 'hibernate' & on plugging in the AC, device
boots to S0.
Change-Id: Iad09914d79cdbd798fb650146321eafed06eb91c
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/354721
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
b6920f42f9
commit
d8b545b177
@@ -140,6 +140,7 @@ uint16_t tcpc_get_alert_status(void)
|
||||
}
|
||||
|
||||
const enum gpio_signal hibernate_wake_pins[] = {
|
||||
GPIO_AC_PRESENT,
|
||||
GPIO_LID_OPEN,
|
||||
GPIO_POWER_BUTTON_L,
|
||||
};
|
||||
@@ -380,12 +381,6 @@ void board_set_charge_limit(int port, int supplier, int charge_ma)
|
||||
CONFIG_CHARGER_INPUT_CURRENT));
|
||||
}
|
||||
|
||||
int extpower_is_present(void)
|
||||
{
|
||||
/* Check VBUS on either port */
|
||||
return bd99955_is_vbus_provided(BD99955_CHARGE_PORT_BOTH);
|
||||
}
|
||||
|
||||
/* Enable or disable input devices, based upon chipset state and tablet mode */
|
||||
static void enable_input_devices(void)
|
||||
{
|
||||
@@ -665,6 +660,9 @@ void board_hibernate(void)
|
||||
{
|
||||
CPRINTS("Enter Pseudo G3");
|
||||
|
||||
/* Enable both the VBUS & VCC ports before entering PG3 */
|
||||
bd99955_select_input_port(BD99955_CHARGE_PORT_BOTH);
|
||||
|
||||
/*
|
||||
* Clean up the UART buffer and prevent any unwanted garbage characters
|
||||
* before power off and also ensure above debug message is printed.
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define CONFIG_BOARD_VERSION
|
||||
#define CONFIG_BOARD_SPECIFIC_VERSION
|
||||
#define CONFIG_BUTTON_COUNT 2
|
||||
#define CONFIG_EXTPOWER_GPIO
|
||||
#define CONFIG_FPU
|
||||
#define CONFIG_I2C
|
||||
#define CONFIG_I2C_MASTER
|
||||
|
||||
@@ -19,8 +19,7 @@ GPIO_INT(SUSPWRNACK, PIN(7, 2), GPIO_INT_BOTH, power_signal_interrupt)
|
||||
GPIO_INT(RSMRST_L_PGOOD, PIN(6, 0), GPIO_INT_BOTH, power_signal_interrupt) /* PMIC_EC_RSMRST_ODL */
|
||||
GPIO_INT(ALL_SYS_PGOOD, PIN(5, 0), GPIO_INT_BOTH, power_signal_interrupt) /* PMIC_EC_PWROK_OD */
|
||||
|
||||
/* FIXME(dhendrix): What to do with ACOK_OD? */
|
||||
//GPIO_INT(AC_PRESENT, PIN(C, 1), GPIO_INT_BOTH | GPIO_INPUT, extpower_interrupt) /* ACOK_OD from BD99955 */
|
||||
GPIO_INT(AC_PRESENT, PIN(C, 1), GPIO_INT_BOTH, extpower_interrupt) /* ACOK_OD from BD99955 */
|
||||
/* TODO: We might remove external pull-up for POWER_BUTTON_L in EVT */
|
||||
GPIO_INT(POWER_BUTTON_L, PIN(0, 4), GPIO_INT_BOTH, power_button_interrupt) /* MECH_PWR_BTN_ODL */
|
||||
/* FIXME(furquan): GPIO_PULL_UP is not required for LID_OPEN on EVT. */
|
||||
|
||||
Reference in New Issue
Block a user