summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/olpc-pm.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@laptop.org>2008-09-09 15:32:14 -0700
committerDeepak Saxena <dsaxena@laptop.org>2008-09-09 15:32:14 -0700
commit850b087f7daf1b0251d299cfd04a4aa7b043ba4e (patch)
tree0033ab5c23dfadb8ee3b4230576ae8057973ee93 /arch/x86/kernel/olpc-pm.c
parent2dfd32b70c58803fbfd73f9dcb0489d1f976535c (diff)
downloadlwn-850b087f7daf1b0251d299cfd04a4aa7b043ba4e.tar.gz
lwn-850b087f7daf1b0251d299cfd04a4aa7b043ba4e.zip
Re-enable Lid events on wakeup760
We currently do not re-enable the lid events when we wake up, leading to the following bug, as per OLPC Trac #8117: Power button -> Suspend Power button -> Wake up Lid close -> No Suspend Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Diffstat (limited to 'arch/x86/kernel/olpc-pm.c')
-rw-r--r--arch/x86/kernel/olpc-pm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/olpc-pm.c b/arch/x86/kernel/olpc-pm.c
index 9532a5b16b60..4c758f7e6e02 100644
--- a/arch/x86/kernel/olpc-pm.c
+++ b/arch/x86/kernel/olpc-pm.c
@@ -373,6 +373,15 @@ void olpc_fixup_wakeup(void)
/* tell the wireless module to restart USB communication */
olpc_ec_cmd(0x24, NULL, 0, NULL, 0);
}
+
+ /*
+ * Re-enable all LID events
+ */
+ if (olpc_board_at_least(olpc_board(0xb2))) {
+ geode_gpio_set(OLPC_GPIO_LID, GPIO_NEGATIVE_EDGE_EN);
+ geode_gpio_set(OLPC_GPIO_LID, GPIO_POSITIVE_EDGE_EN);
+ geode_gpio_set(OLPC_GPIO_LID, GPIO_EVENTS_ENABLE);
+ }
}
int olpc_fixup_sleep(void)