power: ryu: ignore lid open events

Do not start the AP on lid open events,
in order to avoid spurious startup due to magnet magic.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=smaug
BUG=chrome-os-partner:41601
TEST=Play with 2 Ryu EVT2 stacked one on top of the other.

Change-Id: I530d54f61d0674caddf20d1b17268c971f639f2f
Reviewed-on: https://chromium-review.googlesource.com/281667
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vincent Palatin
2015-06-24 13:31:58 -07:00
committed by ChromeOS Commit Bot
parent cbb79c2558
commit 4fd15f8d91
3 changed files with 6 additions and 1 deletions

View File

@@ -82,6 +82,7 @@
#define CONFIG_POWER_COMMON
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_ACTIVE_STATE 1
#define CONFIG_POWER_IGNORE_LID_OPEN
/* I2C ports configuration */
#define I2C_PORT_MASTER 0

View File

@@ -1059,6 +1059,9 @@
/* Compile common code for AP power state machine */
#undef CONFIG_POWER_COMMON
/* Disable the power-on transition when the lid is opened */
#undef CONFIG_POWER_IGNORE_LID_OPEN
/* Support stopping in S5 on shutdown */
#undef CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5

View File

@@ -231,7 +231,7 @@ static int check_for_power_off_event(void)
return 0;
}
#ifndef CONFIG_POWER_IGNORE_LID_OPEN
static void tegra_lid_event(void)
{
/* Power task only cares about lid-open events */
@@ -242,6 +242,7 @@ static void tegra_lid_event(void)
task_wake(TASK_ID_CHIPSET);
}
DECLARE_HOOK(HOOK_LID_CHANGE, tegra_lid_event, HOOK_PRIO_DEFAULT);
#endif /* !CONFIG_POWER_IGNORE_LID_OPEN */
enum power_state power_chipset_init(void)
{