x86/olpc/xo15/sci: Enable lid close wakeup control
x86/olpc/xo15/sci: Enable lid close wakeup control

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 <83b0c3d63e8a11eb6e40077030b59e95bfe31ffa@laptop.org>
Cc: Andres Salomon <3945bcf5fa0c9ecb9066fe0f9d287073618c06cc@queued.net>
Cc: Matthew Garrett <4cf8d479716eba9bc68e0146d95320fcb138b96b@redhat.com>
[ Fixed sscanf checking]
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Link: f93f2526db2d51b9b648a8e615686a5792c9117c@git.kernel.org
[ Did very minor readability tweaks ]
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs