]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86, olpc-xo15-sci: enable lid close wakeup control through sysfs
authorDaniel Drake <dsd@laptop.org>
Thu, 8 Dec 2011 04:32:08 +0000 (15:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Dec 2011 05:47:54 +0000 (16:47 +1100)
commit0c6b7f4cec4ffa27988cf73adc91a2d6703b58fc
treeb47ccb1f6f6eeffe63633fe5659a6e6da32a31d1
parent7a64c1e67ab5b2b9e2da079717e6cd8bafaabfc2
x86, olpc-xo15-sci: enable lid close wakeup control through sysfs

Like most systems, OLPC's ACPI LID switch wakes up the system when the lid
is opened, but not when it is closed.

Under OLPC's opportunistic suspend model, the lid may be closed while the
system was oportunistically suspended with the screen running.  In this
event, we want to wake up to turn the screen off.

Enable control of normal ACPI wakeups through lid close events through a
new sysfs attribute "lid_wake_on_closed".  When set, and when LID wakeups
are enabled through ACPI, the system will wake up on both open and close
lid events.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: Andres Salomon <dilinger@queued.net>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/platform/olpc/olpc-xo15-sci.c