mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
Kunimitsu: Buffer AC status to the PCH
Ported the patch from Glados. Change-Id: Id7e6ca674e35c98594d09b86ab5bdf518f8b3984 Reviewed-on: https://chromium-review.googlesource.com/288922 BUG=none BRANCH=none TEST=boot on Kunimitsu and verify PCH_ACOK is asserted when the device starts to charge and is deasserted when no cable is connected. Change-Id: I869dab9dacc9c80da1cff79d795f07e16cbd37de Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/295864 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-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
8cd6cb8d2b
commit
eb57628abe
@@ -308,9 +308,21 @@ static void board_init(void)
|
||||
/* Enable pericom BC1.2 interrupts */
|
||||
gpio_enable_interrupt(GPIO_USB_C0_BC12_INT_L);
|
||||
gpio_enable_interrupt(GPIO_USB_C1_BC12_INT_L);
|
||||
|
||||
/* Provide AC status to the PCH */
|
||||
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/**
|
||||
* Buffer the AC present GPIO to the PCH.
|
||||
*/
|
||||
static void board_extpower(void)
|
||||
{
|
||||
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
|
||||
}
|
||||
DECLARE_HOOK(HOOK_AC_CHANGE, board_extpower, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/**
|
||||
* Set active charge port -- only one port can be active at a time.
|
||||
*
|
||||
|
||||
@@ -60,7 +60,7 @@ GPIO(PCH_WAKE_L, PIN(66), GPIO_ODR_HIGH)
|
||||
GPIO(EC_FAN1_TTACH, PIN(105), GPIO_INPUT)
|
||||
/* Fan PWM output - NC / testing only */
|
||||
GPIO(EC_FAN1_PWM, PIN(136), GPIO_OUT_LOW)
|
||||
GPIO(PCH_ACOK, PIN(110), GPIO_ODR_HIGH)
|
||||
GPIO(PCH_ACOK, PIN(110), GPIO_OUT_LOW)
|
||||
/* Interrupts from accelerometer / gyro -- not yet implemented */
|
||||
GPIO(LID_ACCEL_INT, PIN(161), GPIO_INPUT | GPIO_PULL_DOWN) /* Lid ACCEL sensor interrupt to EC */
|
||||
GPIO(GYRO_INT, PIN(127), GPIO_INPUT | GPIO_PULL_DOWN) /* Lid Gyro sensor interrupt to EC */
|
||||
|
||||
Reference in New Issue
Block a user