Skip to contentSkip to conversation

OLPC XO-1.5 ebook switch driver

PATCH New Daniel Drake 1 participant 1 message Feb 3, 2011 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 OLPC XO-1.5 ebook switch driver

From: Paul Fox <[email protected]>

The OLPC XO-1.5 has an ebook switch, triggered when the laptop screen is rotated then folding down, converting the device into ebook form.

This switch is exposed through ACPI. Add a driver that exposes it to userspace as an input device.

---
 drivers/platform/x86/Kconfig      |    9 ++
 drivers/platform/x86/Makefile     |    1 +
 drivers/platform/x86/xo15-ebook.c |  181 +++++++++++++++++++++++++++++++++++++
 3 files changed, 191 insertions(+), 0 deletions(-)
 create mode 100644 drivers/platform/x86/xo15-ebook.c

v2: incorporates all feedback from Dmitry Torokhov
v3: resubmit after no response, fix for latest ACPI changes in linux-next

drivers/platform/x86/Kconfig +9 -0
index d163bc2..d31084b 100644
@@ -654,4 +654,13 @@ config XO1_RFKILL
 	  Support for enabling/disabling the WLAN interface on the OLPC XO-1
 	  laptop.
 
+config XO15_EBOOK
+	tristate "OLPC XO-1.5 ebook switch"
+	depends on ACPI && INPUT
+	---help---
+	  Support for the ebook switch on the OLPC XO-1.5 laptop.
+
+	  This switch is triggered as the screen is rotated and folded down to
+	  convert the device into ebook form.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index 4ec4ff8..130cf58 100644
@@ -34,3 +34,4 @@ obj-$(CONFIG_INTEL_IPS)		+= intel_ips.o
 obj-$(CONFIG_GPIO_INTEL_PMIC)	+= intel_pmic_gpio.o
 obj-$(CONFIG_XO1_RFKILL)	+= xo1-rfkill.o
 obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
+obj-$(CONFIG_XO15_EBOOK)	+= xo15-ebook.o
drivers/platform/x86/xo15-ebook.c new file +181 -0

181 lines not on this page · raw message

Signature · 1 line
1.7.3.5