Skip to contentSkip to conversation

Add OLPC XO-1 rfkill driver

PATCH Applied Daniel Drake 2 participants 2 messages Oct 5, 2010 – Oct 21, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add OLPC XO-1 rfkill driver

Add a software rfkill switch for the WLAN interface in the OLPC XO-1 laptop. It uses the OLPC embedded controller to cut/restore power to the Marvell WLAN chip on the motherboard.

---
 arch/x86/include/asm/olpc.h       |    2 +
 drivers/platform/x86/Kconfig      |    8 ++++
 drivers/platform/x86/Makefile     |    1 +
 drivers/platform/x86/xo1-rfkill.c |   85 +++++++++++++++++++++++++++++++++++++
 4 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 drivers/platform/x86/xo1-rfkill.c

v2: removed "loading" message

arch/x86/include/asm/olpc.h +2 -0
index 101229b..42a978c 100644
@@ -89,6 +89,8 @@ extern int olpc_ec_mask_unset(uint8_t bits);
 /* EC commands */
 
 #define EC_FIRMWARE_REV		0x08
+#define EC_WLAN_ENTER_RESET	0x35
+#define EC_WLAN_LEAVE_RESET	0x25
 
 /* SCI source values */
 
drivers/platform/x86/Kconfig +8 -0
index b49f9b1..d7e56b3 100644
@@ -595,4 +595,12 @@ config INTEL_IPS
 	  functionality.  If in doubt, say Y here; it will only load on
 	  supported platforms.
 
+config XO1_RFKILL
+	tristate "OLPC XO-1 software RF kill switch"
+	depends on OLPC
+	depends on RFKILL
+	---help---
+	  Support for enabling/disabling the WLAN interface on the OLPC XO-1
+	  laptop.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index b26df2e..cd87f83 100644
@@ -30,4 +30,5 @@ obj-$(CONFIG_INTEL_SCU_IPC)	+= intel_scu_ipc.o
 obj-$(CONFIG_RAR_REGISTER)	+= intel_rar_register.o
 obj-$(CONFIG_INTEL_IPS)		+= intel_ips.o
 obj-$(CONFIG_GPIO_INTEL_PMIC)	+= intel_pmic_gpio.o
+obj-$(CONFIG_XO1_RFKILL)	+= xo1-rfkill.o
 
drivers/platform/x86/xo1-rfkill.c new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
1.7.2.3