mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
samus: Fix ACOK buffer on chipset state transitions
The ACOK buffer from EC to PCH was not being triggered when the chipset powers up or down, instead it was only triggering when AC state was changed. Since we want it to be driven in S5 I added HOOK_CHIPSET_PRE_INIT to the power sequence in the G3S5 state transition. BUG=chrome-os-partner:23752 BRANCH=none TEST=power on samus proto1b with AC inserted and see PCH_ACOK go high, power off and see it go low again. Ensure that it is also changed with AC state transitions. Change-Id: I4cbe123322e234dc07f10fd1cdff5a8b771a4e02 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/176630 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
9a568cc154
commit
bec6b5c93c
@@ -45,6 +45,14 @@ static void extpower_buffer_to_pch(void)
|
||||
gpio_set_level(GPIO_PCH_ACOK, extpower_is_present());
|
||||
}
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, extpower_buffer_to_pch, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void extpower_shutdown(void)
|
||||
{
|
||||
/* Drive ACOK buffer to PCH low when shutting down */
|
||||
gpio_set_level(GPIO_PCH_ACOK, 0);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, extpower_shutdown, HOOK_PRIO_DEFAULT);
|
||||
|
||||
void extpower_interrupt(enum gpio_signal signal)
|
||||
{
|
||||
|
||||
@@ -233,6 +233,9 @@ enum x86_state x86_handle_state(enum x86_state state)
|
||||
|
||||
/* Wait 5ms for SUSCLK to stabilize */
|
||||
msleep(5);
|
||||
|
||||
/* Call hook to indicate out of G3 state */
|
||||
hook_notify(HOOK_CHIPSET_PRE_INIT);
|
||||
return X86_S5;
|
||||
|
||||
case X86_S5S3:
|
||||
|
||||
Reference in New Issue
Block a user