[PATCH 1/1] toshiba_acpi: Add support for bluetooth toggling through rfkill (v8)

Previous thread: DEAR: EMAIL ACCOUNT OWNER by ACCOUNT UPGARDING TEAM on Saturday, August 30, 2008 - 8:06 am. (1 message)

Next thread: [PATCH] softlockup: minor cleanup, don't check task->state twice by Oleg Nesterov on Saturday, August 30, 2008 - 10:08 am. (2 messages)
From: philipl
Date: Saturday, August 30, 2008 - 8:57 am

There's been a patch floating around for toshiba_acpi that exports an ad-hoc
/proc interface to toggle the bluetooth adapter in a large number of Toshiba
laptops. I'm not sure if it's still relevant for the latest models, but it is
still required for older models such as my Tecra M3.

This change pulls in the low level Toshiba-specific code from the old patch and
sets up an rfkill device and a polled input device to track the state of the
hardware kill-switch.

Signed-off-by: Philip Langdale <philipl@overt.org>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
---
 Kconfig        |    3
 toshiba_acpi.c |  261 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 256 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 735f5ea..12cf5d4 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -260,6 +260,9 @@ config ACPI_ASUS
 config ACPI_TOSHIBA
 	tristate "Toshiba Laptop Extras"
 	depends on X86
+	select INPUT_POLLDEV
+	select NET
+	select RFKILL
 	select BACKLIGHT_CLASS_DEVICE
 	---help---
 	  This driver adds support for access to certain system settings
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index 0a43c8e..8a649f4 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -3,6 +3,7 @@
  *
  *
  *  Copyright (C) 2002-2004 John Belmonte
+ *  Copyright (C) 2008 Philip Langdale
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -33,7 +34,7 @@
  *
  */

-#define TOSHIBA_ACPI_VERSION	"0.18"
+#define TOSHIBA_ACPI_VERSION	"0.19"
 #define PROC_INTERFACE_VERSION	1

 #include <linux/kernel.h>
@@ -42,6 +43,9 @@
 #include <linux/types.h>
 #include <linux/proc_fs.h>
 #include <linux/backlight.h>
+#include <linux/platform_device.h>
+#include <linux/rfkill.h>
+#include <linux/input-polldev.h>

 #include <asm/uaccess.h>

@@ -90,6 +94,7 ...
Previous thread: DEAR: EMAIL ACCOUNT OWNER by ACCOUNT UPGARDING TEAM on Saturday, August 30, 2008 - 8:06 am. (1 message)

Next thread: [PATCH] softlockup: minor cleanup, don't check task->state twice by Oleg Nesterov on Saturday, August 30, 2008 - 10:08 am. (2 messages)