All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] x86 platform drivers tree
@ 2010-02-26 15:18 Matthew Garrett
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
                   ` (16 more replies)
  0 siblings, 17 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Many of the x86 platform drivers are either entirely unrelated to ACPI, or
only barely so. So, with Len's blessing:

The following changes since commit baac35c4155a8aa826c70acee6553368ca5243a2:
  Xiaotian Feng (1):
        security: fix error return path in ima_inode_alloc

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git for_linus

Erik Andren (1):
      dell-laptop: Add another Dell laptop to the DMI whitelist

Mario Limonciello (4):
      compal-laptop: Add support for known Compal made Dell laptops
      compal-laptop: Replace sysfs support with rfkill support
      dell-laptop: Block software state changes when rfkill hard blocked
      dell-laptop: Blacklist machines not supporting dell-laptop

Matthew Garrett (7):
      MAINTAINERS: update drivers/platform/x86 information
      dell-laptop: Update rfkill state on kill switch
      dell-laptop: Fix platform device unregistration
      dell-laptop: Fix small memory leak
      dell-laptop: Pay attention to which devices the hardware switch controls
      hp-wmi: Add support for tablet rotation key
      toshiba_acpi: Add full hotkey support

Stuart Hayes (1):
      dell-laptop: Use buffer with 32-bit physical address

Thadeu Lima de Souza Cascardo (1):
      classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases

 MAINTAINERS                             |   29 +++-
 drivers/platform/x86/Kconfig            |    1 +
 drivers/platform/x86/classmate-laptop.c |   31 +++--
 drivers/platform/x86/compal-laptop.c    |  247 +++++++++++++-----------------
 drivers/platform/x86/dell-laptop.c      |  256 ++++++++++++++++++++++++++-----
 drivers/platform/x86/hp-wmi.c           |    1 +
 drivers/platform/x86/toshiba_acpi.c     |  206 ++++++++++++++++++++++++-
 7 files changed, 575 insertions(+), 196 deletions(-)


^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 16:18   ` Thadeu Lima de Souza Cascardo
                     ` (5 more replies)
  2010-02-26 15:18 ` [PATCH 02/14] compal-laptop: Add support for known Compal made Dell laptops Matthew Garrett
                   ` (15 subsequent siblings)
  16 siblings, 6 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds
  Cc: linux-kernel, Matthew Garrett, Anisse Astier, Carlos Corbacho,
	Cezary Jackiewicz, Corentin Chary, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Len Brown, Lennart Poettering, Mattia Dongili, Peter Feuerer,
	Sujith Thomas, Thadeu Lima de Souza Cascardo

Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
it's kind of inappropriate for them to be stuck under the ACPI mailing
list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
with Len's blessing, add myself as subsystem maintainer.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Anisse Astier <anisse@astier.eu>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Daniel Oliveira Nascimento <don@syst.com.br>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Cc: Mattia Dongili <malattia@linux.it>
Cc: Peter Feuerer <peter@piie.net>
Cc: Sujith Thomas <sujith.thomas@intel.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
 MAINTAINERS |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 2533fc4..f355d11 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -221,6 +221,7 @@ F:	drivers/net/acenic*
 
 ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER
 M:	Peter Feuerer <peter@piie.net>
+L:	platform-driver-x86@vger.kernel.org
 W:	http://piie.net/?section=acerhdf
 S:	Maintained
 F:	drivers/platform/x86/acerhdf.c
@@ -228,6 +229,7 @@ F:	drivers/platform/x86/acerhdf.c
 ACER WMI LAPTOP EXTRAS
 M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
 L:	aceracpi@googlegroups.com (subscribers-only)
+L:	platform-driver-x86@vger.kernel.org
 W:	http://code.google.com/p/aceracpi
 S:	Maintained
 F:	drivers/platform/x86/acer-wmi.c
@@ -288,7 +290,7 @@ F:	drivers/acpi/video.c
 
 ACPI WMI DRIVER
 M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
-L:	linux-acpi@vger.kernel.org
+L:	platform-driver-x86@vger.kernel.org
 W:	http://www.lesswatts.org/projects/acpi/
 S:	Maintained
 F:	drivers/platform/x86/wmi.c
@@ -968,6 +970,7 @@ ASUS ACPI EXTRAS DRIVER
 M:	Corentin Chary <corentincj@iksaif.net>
 M:	Karol Kozimor <sziwan@users.sourceforge.net>
 L:	acpi4asus-user@lists.sourceforge.net
+L:	platform-driver-x86@vger.kernel.org
 W:	http://acpi4asus.sf.net
 S:	Maintained
 F:	drivers/platform/x86/asus_acpi.c
@@ -981,6 +984,7 @@ F:	drivers/hwmon/asb100.c
 ASUS LAPTOP EXTRAS DRIVER
 M:	Corentin Chary <corentincj@iksaif.net>
 L:	acpi4asus-user@lists.sourceforge.net
+L:	platform-driver-x86@vger.kernel.org
 W:	http://acpi4asus.sf.net
 S:	Maintained
 F:	drivers/platform/x86/asus-laptop.c
@@ -1473,6 +1477,7 @@ F:	drivers/scsi/fnic/
 CMPC ACPI DRIVER
 M:	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
 M:	Daniel Oliveira Nascimento <don@syst.com.br>
+L:	platform-driver-x86@vger.kernel.org
 S:	Supported
 F:	drivers/platform/x86/classmate-laptop.c
 
@@ -1516,6 +1521,7 @@ F:	drivers/pci/hotplug/cpcihp_generic.c
 
 COMPAL LAPTOP SUPPORT
 M:	Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	drivers/platform/x86/compal-laptop.c
 
@@ -1746,6 +1752,7 @@ F:	drivers/net/defxx.*
 
 DELL LAPTOP DRIVER
 M:	Matthew Garrett <mjg59@srcf.ucam.org>
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	drivers/platform/x86/dell-laptop.c
 
@@ -2028,6 +2035,7 @@ F:	drivers/edac/r82600_edac.c
 EEEPC LAPTOP EXTRAS DRIVER
 M:	Corentin Chary <corentincj@iksaif.net>
 L:	acpi4asus-user@lists.sourceforge.net
+L:	platform-driver-x86@vger.kernel.org
 W:	http://acpi4asus.sf.net
 S:	Maintained
 F:	drivers/platform/x86/eeepc-laptop.c
@@ -2295,7 +2303,7 @@ F:	arch/frv/
 
 FUJITSU LAPTOP EXTRAS
 M:	Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
-L:	linux-acpi@vger.kernel.org
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	drivers/platform/x86/fujitsu-laptop.c
 
@@ -2561,6 +2569,7 @@ F:	drivers/net/wireless/hostap/
 
 HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
 M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
+L:	platform-driver-x86@vger.kernel.org
 S:	Odd Fixes
 F:	drivers/platform/x86/tc1100-wmi.c
 
@@ -2771,7 +2780,7 @@ F:	drivers/video/i810/
 
 INTEL MENLOW THERMAL DRIVER
 M:	Sujith Thomas <sujith.thomas@intel.com>
-L:	linux-acpi@vger.kernel.org
+L:	platform-driver-x86@vger.kernel.org
 W:	http://www.lesswatts.org/projects/acpi/
 S:	Supported
 F:	drivers/platform/x86/intel_menlow.c
@@ -3637,6 +3646,7 @@ F:	drivers/char/mxser.*
 
 MSI LAPTOP SUPPORT
 M:	Lennart Poettering <mzxreary@0pointer.de>
+L:	platform-driver-x86@vger.kernel.org
 W:	https://tango.0pointer.de/mailman/listinfo/s270-linux
 W:	http://0pointer.de/lennart/tchibo.html
 S:	Maintained
@@ -3644,6 +3654,7 @@ F:	drivers/platform/x86/msi-laptop.c
 
 MSI WMI SUPPORT
 M:	Anisse Astier <anisse@astier.eu>
+L:	platform-driver-x86@vger.kernel.org
 S:	Supported
 F:	drivers/platform/x86/msi-wmi.c
 
@@ -4096,6 +4107,7 @@ F:	drivers/i2c/busses/i2c-pasemi.c
 
 PANASONIC LAPTOP ACPI EXTRAS DRIVER
 M:	Harald Welte <laforge@gnumonks.org>
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	drivers/platform/x86/panasonic-laptop.c
 
@@ -5034,7 +5046,7 @@ F:	include/linux/ssb/
 
 SONY VAIO CONTROL DEVICE DRIVER
 M:	Mattia Dongili <malattia@linux.it>
-L:	linux-acpi@vger.kernel.org
+L:	platform-driver-x86@vger.kernel.org
 W:	http://www.linux.it/~malattia/wiki/index.php/Sony_drivers
 S:	Maintained
 F:	Documentation/laptops/sony-laptop.txt
@@ -5240,6 +5252,7 @@ F:	arch/xtensa/
 THINKPAD ACPI EXTRAS DRIVER
 M:	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
 L:	ibm-acpi-devel@lists.sourceforge.net
+L:	platform-driver-x86@vger.kernel.org
 W:	http://ibm-acpi.sourceforge.net
 W:	http://thinkwiki.org/wiki/Ibm-acpi
 T:	git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
@@ -5293,10 +5306,12 @@ F:	security/tomoyo/
 
 TOPSTAR LAPTOP EXTRAS DRIVER
 M:	Herton Ronaldo Krzesinski <herton@mandriva.com.br>
+L:	platform-driver-x86@vger.kernel.org
 S:	Maintained
 F:	drivers/platform/x86/topstar-laptop.c
 
 TOSHIBA ACPI EXTRAS DRIVER
+L:	platform-driver-x86@vger.kernel.org
 S:	Orphan
 F:	drivers/platform/x86/toshiba_acpi.c
 
@@ -6024,6 +6039,12 @@ S:	Maintained
 F:	Documentation/x86/
 F:	arch/x86/
 
+X86 PLATFORM DRIVERS
+M:	Matthew Garrett <mjg@redhat.com>
+L:	platform-driver-x86@vger.kernel.org
+S:	Maintained
+F:	drivers/platform/x86
+
 XEN HYPERVISOR INTERFACE
 M:	Jeremy Fitzhardinge <jeremy@xensource.com>
 M:	Chris Wright <chrisw@sous-sol.org>
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 02/14] compal-laptop: Add support for known Compal made Dell laptops
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 03/14] compal-laptop: Replace sysfs support with rfkill support Matthew Garrett
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds
  Cc: linux-kernel, Mario Limonciello, Tim Gardner, Matthew Garrett,
	Cezary Jackiewicz

From: Mario Limonciello <Mario_Limonciello@Dell.com>

The following Dell laptops are known to have been manufacturer by Compal
and are supported by the compal-laptop platform driver
 - Mini 9
 - Mini 10
 - Mini 12
 - Mini 10v
 - Inspiron 11z

Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
---
 drivers/platform/x86/compal-laptop.c |   46 ++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 1a387e7..c78d254 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -310,6 +310,47 @@ static struct dmi_system_id __initdata compal_dmi_table[] = {
 		},
 		.callback = dmi_check_cb
 	},
+	{
+		.ident = "Dell Mini 9",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 910"),
+		},
+		.callback = dmi_check_cb
+	},
+	{
+		.ident = "Dell Mini 10",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1010"),
+		},
+		.callback = dmi_check_cb
+	},
+	{
+		.ident = "Dell Mini 10v",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1011"),
+		},
+		.callback = dmi_check_cb
+	},
+	{
+		.ident = "Dell Inspiron 11z",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1110"),
+		},
+		.callback = dmi_check_cb
+	},
+	{
+		.ident = "Dell Mini 12",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1210"),
+		},
+		.callback = dmi_check_cb
+	},
+
 	{ }
 };
 
@@ -403,3 +444,8 @@ MODULE_ALIAS("dmi:*:rnIFL90:rvrREFERENCE:*");
 MODULE_ALIAS("dmi:*:rnIFL91:rvrIFT00:*");
 MODULE_ALIAS("dmi:*:rnJFL92:rvrIFT00:*");
 MODULE_ALIAS("dmi:*:rnIFT00:rvrIFT00:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron910:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1010:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1011:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1110:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1210:*");
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 03/14] compal-laptop: Replace sysfs support with rfkill support
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
  2010-02-26 15:18 ` [PATCH 02/14] compal-laptop: Add support for known Compal made Dell laptops Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 04/14] dell-laptop: Update rfkill state on kill switch Matthew Garrett
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds
  Cc: linux-kernel, Mario Limonciello, Tim Gardner, Matthew Garrett,
	Cezary Jackiewicz

From: Mario Limonciello <Mario_Limonciello@Dell.com>

This drops the support for manually groking the files in sysfs
to turn on and off the WLAN and BT for Compal laptops in favor
of platform rfkill support.

It has been combined into a single patch to not introduce regressions
in the process of simply adding rfkill support

Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
---
 drivers/platform/x86/compal-laptop.c |  201 +++++++++++-----------------------
 1 files changed, 63 insertions(+), 138 deletions(-)

diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index c78d254..2740b40 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -26,17 +26,8 @@
 /*
  * comapl-laptop.c - Compal laptop support.
  *
- * This driver exports a few files in /sys/devices/platform/compal-laptop/:
- *
- *   wlan - wlan subsystem state: contains 0 or 1 (rw)
- *
- *   bluetooth - Bluetooth subsystem state: contains 0 or 1 (rw)
- *
- *   raw - raw value taken from embedded controller register (ro)
- *
- * In addition to these platform device attributes the driver
- * registers itself in the Linux backlight control subsystem and is
- * available to userspace under /sys/class/backlight/compal-laptop/.
+ * The driver registers itself with the rfkill subsystem and
+ * the Linux backlight control subsystem.
  *
  * This driver might work on other laptops produced by Compal. If you
  * want to try it you can pass force=1 as argument to the module which
@@ -51,6 +42,7 @@
 #include <linux/dmi.h>
 #include <linux/backlight.h>
 #include <linux/platform_device.h>
+#include <linux/rfkill.h>
 
 #define COMPAL_DRIVER_VERSION "0.2.6"
 
@@ -63,6 +55,10 @@
 #define WLAN_MASK	0x01
 #define BT_MASK 	0x02
 
+static struct rfkill *wifi_rfkill;
+static struct rfkill *bt_rfkill;
+static struct platform_device *compal_device;
+
 static int force;
 module_param(force, bool, 0);
 MODULE_PARM_DESC(force, "Force driver load, ignore DMI data");
@@ -88,65 +84,75 @@ static int get_lcd_level(void)
 	return (int) result;
 }
 
-static int set_wlan_state(int state)
+static int compal_rfkill_set(void *data, bool blocked)
 {
+	unsigned long radio = (unsigned long) data;
 	u8 result, value;
 
 	ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
 
-	if ((result & KILLSWITCH_MASK) == 0)
-		return -EINVAL;
-	else {
-		if (state)
-			value = (u8) (result | WLAN_MASK);
-		else
-			value = (u8) (result & ~WLAN_MASK);
-		ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
-	}
+	if (!blocked)
+		value = (u8) (result | radio);
+	else
+		value = (u8) (result & ~radio);
+	ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
 
 	return 0;
 }
 
-static int set_bluetooth_state(int state)
+static void compal_rfkill_poll(struct rfkill *rfkill, void *data)
 {
-	u8 result, value;
+	u8 result;
+	bool hw_blocked;
 
 	ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
 
-	if ((result & KILLSWITCH_MASK) == 0)
-		return -EINVAL;
-	else {
-		if (state)
-			value = (u8) (result | BT_MASK);
-		else
-			value = (u8) (result & ~BT_MASK);
-		ec_write(COMPAL_EC_COMMAND_WIRELESS, value);
-	}
-
-	return 0;
+	hw_blocked = !(result & KILLSWITCH_MASK);
+	rfkill_set_hw_state(rfkill, hw_blocked);
 }
 
-static int get_wireless_state(int *wlan, int *bluetooth)
+static const struct rfkill_ops compal_rfkill_ops = {
+	.poll = compal_rfkill_poll,
+	.set_block = compal_rfkill_set,
+};
+
+static int setup_rfkill(void)
 {
-	u8 result;
+	int ret;
 
-	ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
+	wifi_rfkill = rfkill_alloc("compal-wifi", &compal_device->dev,
+				RFKILL_TYPE_WLAN, &compal_rfkill_ops,
+				(void *) WLAN_MASK);
+	if (!wifi_rfkill)
+		return -ENOMEM;
 
-	if (wlan) {
-		if ((result & KILLSWITCH_MASK) == 0)
-			*wlan = 0;
-		else
-			*wlan = result & WLAN_MASK;
-	}
+	ret = rfkill_register(wifi_rfkill);
+	if (ret)
+		goto err_wifi;
 
-	if (bluetooth) {
-		if ((result & KILLSWITCH_MASK) == 0)
-			*bluetooth = 0;
-		else
-			*bluetooth = (result & BT_MASK) >> 1;
+	bt_rfkill = rfkill_alloc("compal-bluetooth", &compal_device->dev,
+				RFKILL_TYPE_BLUETOOTH, &compal_rfkill_ops,
+				(void *) BT_MASK);
+	if (!bt_rfkill) {
+		ret = -ENOMEM;
+		goto err_allocate_bt;
 	}
+	ret = rfkill_register(bt_rfkill);
+	if (ret)
+		goto err_register_bt;
 
 	return 0;
+
+err_register_bt:
+	rfkill_destroy(bt_rfkill);
+
+err_allocate_bt:
+	rfkill_unregister(wifi_rfkill);
+
+err_wifi:
+	rfkill_destroy(wifi_rfkill);
+
+	return ret;
 }
 
 /* Backlight device stuff */
@@ -169,86 +175,6 @@ static struct backlight_ops compalbl_ops = {
 
 static struct backlight_device *compalbl_device;
 
-/* Platform device */
-
-static ssize_t show_wlan(struct device *dev,
-	struct device_attribute *attr, char *buf)
-{
-	int ret, enabled;
-
-	ret = get_wireless_state(&enabled, NULL);
-	if (ret < 0)
-		return ret;
-
-	return sprintf(buf, "%i\n", enabled);
-}
-
-static ssize_t show_raw(struct device *dev,
-	struct device_attribute *attr, char *buf)
-{
-	u8 result;
-
-	ec_read(COMPAL_EC_COMMAND_WIRELESS, &result);
-
-	return sprintf(buf, "%i\n", result);
-}
-
-static ssize_t show_bluetooth(struct device *dev,
-	struct device_attribute *attr, char *buf)
-{
-	int ret, enabled;
-
-	ret = get_wireless_state(NULL, &enabled);
-	if (ret < 0)
-		return ret;
-
-	return sprintf(buf, "%i\n", enabled);
-}
-
-static ssize_t store_wlan_state(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
-{
-	int state, ret;
-
-	if (sscanf(buf, "%i", &state) != 1 || (state < 0 || state > 1))
-		return -EINVAL;
-
-	ret = set_wlan_state(state);
-	if (ret < 0)
-		return ret;
-
-	return count;
-}
-
-static ssize_t store_bluetooth_state(struct device *dev,
-	struct device_attribute *attr, const char *buf, size_t count)
-{
-	int state, ret;
-
-	if (sscanf(buf, "%i", &state) != 1 || (state < 0 || state > 1))
-		return -EINVAL;
-
-	ret = set_bluetooth_state(state);
-	if (ret < 0)
-		return ret;
-
-	return count;
-}
-
-static DEVICE_ATTR(bluetooth, 0644, show_bluetooth, store_bluetooth_state);
-static DEVICE_ATTR(wlan, 0644, show_wlan, store_wlan_state);
-static DEVICE_ATTR(raw, 0444, show_raw, NULL);
-
-static struct attribute *compal_attributes[] = {
-	&dev_attr_bluetooth.attr,
-	&dev_attr_wlan.attr,
-	&dev_attr_raw.attr,
-	NULL
-};
-
-static struct attribute_group compal_attribute_group = {
-	.attrs = compal_attributes
-};
 
 static struct platform_driver compal_driver = {
 	.driver = {
@@ -257,8 +183,6 @@ static struct platform_driver compal_driver = {
 	}
 };
 
-static struct platform_device *compal_device;
-
 /* Initialization */
 
 static int dmi_check_cb(const struct dmi_system_id *id)
@@ -389,23 +313,21 @@ static int __init compal_init(void)
 
 	ret = platform_device_add(compal_device);
 	if (ret)
-		goto fail_platform_device1;
+		goto fail_platform_device;
 
-	ret = sysfs_create_group(&compal_device->dev.kobj,
-		&compal_attribute_group);
+	ret = setup_rfkill();
 	if (ret)
-		goto fail_platform_device2;
+		goto fail_rfkill;
 
 	printk(KERN_INFO "compal-laptop: driver "COMPAL_DRIVER_VERSION
 		" successfully loaded.\n");
 
 	return 0;
 
-fail_platform_device2:
-
+fail_rfkill:
 	platform_device_del(compal_device);
 
-fail_platform_device1:
+fail_platform_device:
 
 	platform_device_put(compal_device);
 
@@ -423,10 +345,13 @@ fail_backlight:
 static void __exit compal_cleanup(void)
 {
 
-	sysfs_remove_group(&compal_device->dev.kobj, &compal_attribute_group);
 	platform_device_unregister(compal_device);
 	platform_driver_unregister(&compal_driver);
 	backlight_device_unregister(compalbl_device);
+	rfkill_unregister(wifi_rfkill);
+	rfkill_destroy(wifi_rfkill);
+	rfkill_unregister(bt_rfkill);
+	rfkill_destroy(bt_rfkill);
 
 	printk(KERN_INFO "compal-laptop: driver unloaded.\n");
 }
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 04/14] dell-laptop: Update rfkill state on kill switch
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (2 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 03/14] compal-laptop: Replace sysfs support with rfkill support Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-27  8:06   ` Dmitry Torokhov
  2010-02-26 15:18 ` [PATCH 05/14] dell-laptop: Fix platform device unregistration Matthew Garrett
                   ` (12 subsequent siblings)
  16 siblings, 1 reply; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett

The rfkill interface on Dells only sends a notification that the switch
has been changed via the keyboard controller. Add a filter so we can
pick these notifications up and update the rfkill state appropriately.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/Kconfig       |    1 +
 drivers/platform/x86/dell-laptop.c |   48 ++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f526e73..6848f21 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -79,6 +79,7 @@ config DELL_LAPTOP
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on RFKILL || RFKILL = n
 	depends on POWER_SUPPLY
+	depends on SERIO_I8042
 	default n
 	---help---
 	This driver adds support for rfkill and backlight control to Dell
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 3780994..9d7e0be 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -22,6 +22,7 @@
 #include <linux/rfkill.h>
 #include <linux/power_supply.h>
 #include <linux/acpi.h>
+#include <linux/i8042.h>
 #include "../../firmware/dcdbas.h"
 
 #define BRIGHTNESS_TOKEN 0x7d
@@ -214,6 +215,18 @@ static const struct rfkill_ops dell_rfkill_ops = {
 	.query = dell_rfkill_query,
 };
 
+static void dell_update_rfkill(struct work_struct *ignored)
+{
+	if (wifi_rfkill)
+		dell_rfkill_query(wifi_rfkill, (void *)1);
+	if (bluetooth_rfkill)
+		dell_rfkill_query(bluetooth_rfkill, (void *)2);
+	if (wwan_rfkill)
+		dell_rfkill_query(wwan_rfkill, (void *)3);
+}
+static DECLARE_DELAYED_WORK(dell_rfkill_work, dell_update_rfkill);
+
+
 static int __init dell_setup_rfkill(void)
 {
 	struct calling_interface_buffer buffer;
@@ -338,6 +351,30 @@ static struct backlight_ops dell_ops = {
 	.update_status  = dell_send_intensity,
 };
 
+bool dell_laptop_i8042_filter(unsigned char data, unsigned char str,
+			      struct serio *port)
+{
+	static bool extended;
+
+	if (str & 0x20)
+		return false;
+
+	if (unlikely(data == 0xe0)) {
+		extended = true;
+		return false;
+	} else if (unlikely(extended)) {
+		switch (data) {
+		case 0x8:
+			schedule_delayed_work(&dell_rfkill_work,
+					      round_jiffies_relative(HZ));
+			break;
+		}
+		extended = false;
+	}
+
+	return false;
+}
+
 static int __init dell_init(void)
 {
 	struct calling_interface_buffer buffer;
@@ -373,6 +410,13 @@ static int __init dell_init(void)
 		goto fail_rfkill;
 	}
 
+	ret = i8042_install_filter(dell_laptop_i8042_filter);
+	if (ret) {
+		printk(KERN_WARNING
+		       "dell-laptop: Unable to install key filter\n");
+		goto fail_filter;
+	}
+
 #ifdef CONFIG_ACPI
 	/* In the event of an ACPI backlight being available, don't
 	 * register the platform controller.
@@ -410,6 +454,8 @@ static int __init dell_init(void)
 	return 0;
 
 fail_backlight:
+	i8042_remove_filter(dell_laptop_i8042_filter);
+fail_filter:
 	dell_cleanup_rfkill();
 fail_rfkill:
 	platform_device_del(platform_device);
@@ -424,6 +470,8 @@ fail_platform_driver:
 
 static void __exit dell_exit(void)
 {
+	cancel_delayed_work_sync(&dell_rfkill_work);
+	i8042_remove_filter(dell_laptop_i8042_filter);
 	backlight_device_unregister(dell_backlight_device);
 	dell_cleanup_rfkill();
 }
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 05/14] dell-laptop: Fix platform device unregistration
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (3 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 04/14] dell-laptop: Update rfkill state on kill switch Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-27  8:09   ` Dmitry Torokhov
  2010-02-26 15:18 ` [PATCH 06/14] dell-laptop: Fix small memory leak Matthew Garrett
                   ` (11 subsequent siblings)
  16 siblings, 1 reply; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett

dell-laptop currently fails to clean up its platform device correctly.
Make sure that it's unregistered.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/dell-laptop.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 9d7e0be..b4c2190 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -474,6 +474,10 @@ static void __exit dell_exit(void)
 	i8042_remove_filter(dell_laptop_i8042_filter);
 	backlight_device_unregister(dell_backlight_device);
 	dell_cleanup_rfkill();
+	if (platform_device) {
+		platform_device_del(platform_device);
+		platform_driver_unregister(&platform_driver);
+	}
 }
 
 module_init(dell_init);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 06/14] dell-laptop: Fix small memory leak
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (4 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 05/14] dell-laptop: Fix platform device unregistration Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 07/14] dell-laptop: Block software state changes when rfkill hard blocked Matthew Garrett
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett

da_tokens was not being freed by dell-laptop on unload. Fix that.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/dell-laptop.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index b4c2190..b13eb6a 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -478,6 +478,7 @@ static void __exit dell_exit(void)
 		platform_device_del(platform_device);
 		platform_driver_unregister(&platform_driver);
 	}
+	kfree(da_tokens);
 }
 
 module_init(dell_init);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 07/14] dell-laptop: Block software state changes when rfkill hard blocked
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (5 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 06/14] dell-laptop: Fix small memory leak Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 08/14] dell-laptop: Blacklist machines not supporting dell-laptop Matthew Garrett
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Mario Limonciello

From: Mario Limonciello <Mario_Limonciello@Dell.com>

The "hardware" switch is tied directly to a BIOS interface that will
connect and disconnect the hardware from the bus.

If you use the software interface to request the BIOS to make these
changes, the HW switch will be in an inconsistent state and LEDs may not
reflect the state of the HW.

Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
---
 drivers/platform/x86/dell-laptop.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index b13eb6a..81213e8 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -190,6 +190,10 @@ static int dell_rfkill_set(void *data, bool blocked)
 	unsigned long radio = (unsigned long)data;
 
 	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
+	dell_send_request(&buffer, 17, 11);
+	if (!(buffer.output[1] & BIT(16)))
+		return -EINVAL;
+
 	buffer.input[0] = (1 | (radio<<8) | (disable << 16));
 	dell_send_request(&buffer, 17, 11);
 
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 08/14] dell-laptop: Blacklist machines not supporting dell-laptop
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (6 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 07/14] dell-laptop: Block software state changes when rfkill hard blocked Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address Matthew Garrett
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Mario Limonciello, Tim Gardner

From: Mario Limonciello <superm1@ubuntu.com>

The Mini family doesn't support smbios 17,11 although it reports it does.

Signed-off-by: Mario Limonciello <superm1@ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 drivers/platform/x86/dell-laptop.c |   46 ++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 81213e8..d8b1b39 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -83,6 +83,46 @@ static const struct dmi_system_id __initdata dell_device_table[] = {
 	{ }
 };
 
+static struct dmi_system_id __devinitdata dell_blacklist[] = {
+	/* Supported by compal-laptop */
+	{
+		.ident = "Dell Mini 9",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 910"),
+		},
+	},
+	{
+		.ident = "Dell Mini 10",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1010"),
+		},
+	},
+	{
+		.ident = "Dell Mini 10v",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1011"),
+		},
+	},
+	{
+		.ident = "Dell Inspiron 11z",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1110"),
+		},
+	},
+	{
+		.ident = "Dell Mini 12",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1210"),
+		},
+	},
+	{}
+};
+
 static void __init parse_da_table(const struct dmi_header *dm)
 {
 	/* Final token is a terminator, so we don't want to copy it */
@@ -237,6 +277,12 @@ static int __init dell_setup_rfkill(void)
 	int status;
 	int ret;
 
+	if (dmi_check_system(dell_blacklist)) {
+		printk(KERN_INFO "dell-laptop: Blacklisted hardware detected - "
+				"not enabling rfkill\n");
+		return 0;
+	}
+
 	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
 	dell_send_request(&buffer, 17, 11);
 	status = buffer.output[1];
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (7 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 08/14] dell-laptop: Blacklist machines not supporting dell-laptop Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-27  8:11   ` Dmitry Torokhov
  2010-02-26 15:18 ` [PATCH 10/14] dell-laptop: Pay attention to which devices the hardware switch controls Matthew Garrett
                   ` (7 subsequent siblings)
  16 siblings, 1 reply; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Stuart Hayes

From: Stuart Hayes <stuart_hayes@dell.com>

Calls to communicate with system firmware via a SMI (using dcdbas)
need to use a buffer that has a physical address of 4GB or less.
Currently the dell-laptop driver does not guarantee this, and when the
buffer address is higher than 4GB, the address is truncated to 32 bits
and the SMI handler writes to the wrong memory address.

Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/dell-laptop.c |  122 ++++++++++++++++++++++++-----------
 1 files changed, 83 insertions(+), 39 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index d8b1b39..1a0bfd4 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -22,6 +22,7 @@
 #include <linux/rfkill.h>
 #include <linux/power_supply.h>
 #include <linux/acpi.h>
+#include <linux/mm.h>
 #include <linux/i8042.h>
 #include "../../firmware/dcdbas.h"
 
@@ -123,6 +124,21 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = {
 	{}
 };
 
+static struct calling_interface_buffer *buffer;
+struct page *bufferpage;
+DEFINE_MUTEX(buffer_mutex);
+
+static void get_buffer(void)
+{
+	mutex_lock(&buffer_mutex);
+	memset(buffer, 0, sizeof(struct calling_interface_buffer));
+}
+
+static void release_buffer(void)
+{
+	mutex_unlock(&buffer_mutex);
+}
+
 static void __init parse_da_table(const struct dmi_header *dm)
 {
 	/* Final token is a terminator, so we don't want to copy it */
@@ -225,30 +241,35 @@ dell_send_request(struct calling_interface_buffer *buffer, int class,
 
 static int dell_rfkill_set(void *data, bool blocked)
 {
-	struct calling_interface_buffer buffer;
 	int disable = blocked ? 1 : 0;
 	unsigned long radio = (unsigned long)data;
+	int ret = 0;
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	dell_send_request(&buffer, 17, 11);
-	if (!(buffer.output[1] & BIT(16)))
-		return -EINVAL;
+	get_buffer();
+	dell_send_request(buffer, 17, 11);
 
-	buffer.input[0] = (1 | (radio<<8) | (disable << 16));
-	dell_send_request(&buffer, 17, 11);
+	if (!(buffer->output[1] & BIT(16))) {
+		ret = -EINVAL;
+		goto out;
+	}
 
-	return 0;
+	buffer->input[0] = (1 | (radio<<8) | (disable << 16));
+	dell_send_request(buffer, 17, 11);
+
+out:
+	release_buffer();
+	return ret;
 }
 
 static void dell_rfkill_query(struct rfkill *rfkill, void *data)
 {
-	struct calling_interface_buffer buffer;
 	int status;
 	int bit = (unsigned long)data + 16;
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	dell_send_request(&buffer, 17, 11);
-	status = buffer.output[1];
+	get_buffer();
+	dell_send_request(buffer, 17, 11);
+	status = buffer->output[1];
+	release_buffer();
 
 	rfkill_set_sw_state(rfkill, !!(status & BIT(bit)));
 	rfkill_set_hw_state(rfkill, !(status & BIT(16)));
@@ -273,7 +294,6 @@ static DECLARE_DELAYED_WORK(dell_rfkill_work, dell_update_rfkill);
 
 static int __init dell_setup_rfkill(void)
 {
-	struct calling_interface_buffer buffer;
 	int status;
 	int ret;
 
@@ -283,9 +303,10 @@ static int __init dell_setup_rfkill(void)
 		return 0;
 	}
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	dell_send_request(&buffer, 17, 11);
-	status = buffer.output[1];
+	get_buffer();
+	dell_send_request(buffer, 17, 11);
+	status = buffer->output[1];
+	release_buffer();
 
 	if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {
 		wifi_rfkill = rfkill_alloc("dell-wifi", &platform_device->dev,
@@ -361,39 +382,49 @@ static void dell_cleanup_rfkill(void)
 
 static int dell_send_intensity(struct backlight_device *bd)
 {
-	struct calling_interface_buffer buffer;
+	int ret = 0;
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	buffer.input[0] = find_token_location(BRIGHTNESS_TOKEN);
-	buffer.input[1] = bd->props.brightness;
+	get_buffer();
+	buffer->input[0] = find_token_location(BRIGHTNESS_TOKEN);
+	buffer->input[1] = bd->props.brightness;
 
-	if (buffer.input[0] == -1)
-		return -ENODEV;
+	if (buffer->input[0] == -1) {
+		ret = -ENODEV;
+		goto out;
+	}
 
 	if (power_supply_is_system_supplied() > 0)
-		dell_send_request(&buffer, 1, 2);
+		dell_send_request(buffer, 1, 2);
 	else
-		dell_send_request(&buffer, 1, 1);
+		dell_send_request(buffer, 1, 1);
 
+out:
+	release_buffer();
 	return 0;
 }
 
 static int dell_get_intensity(struct backlight_device *bd)
 {
-	struct calling_interface_buffer buffer;
+	int ret = 0;
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	buffer.input[0] = find_token_location(BRIGHTNESS_TOKEN);
+	get_buffer();
+	buffer->input[0] = find_token_location(BRIGHTNESS_TOKEN);
 
-	if (buffer.input[0] == -1)
-		return -ENODEV;
+	if (buffer->input[0] == -1) {
+		ret = -ENODEV;
+		goto out;
+	}
 
 	if (power_supply_is_system_supplied() > 0)
-		dell_send_request(&buffer, 0, 2);
+		dell_send_request(buffer, 0, 2);
 	else
-		dell_send_request(&buffer, 0, 1);
+		dell_send_request(buffer, 0, 1);
 
-	return buffer.output[1];
+out:
+	release_buffer();
+	if (ret)
+		return ret;
+	return buffer->output[1];
 }
 
 static struct backlight_ops dell_ops = {
@@ -427,7 +458,6 @@ bool dell_laptop_i8042_filter(unsigned char data, unsigned char str,
 
 static int __init dell_init(void)
 {
-	struct calling_interface_buffer buffer;
 	int max_intensity = 0;
 	int ret;
 
@@ -453,6 +483,17 @@ static int __init dell_init(void)
 	if (ret)
 		goto fail_platform_device2;
 
+	/*
+	 * Allocate buffer below 4GB for SMI data--only 32-bit physical addr
+	 * is passed to SMI handler.
+	 */
+	bufferpage = alloc_page(GFP_KERNEL | GFP_DMA32);
+
+	if (!bufferpage)
+		goto fail_buffer;
+	buffer = page_address(bufferpage);
+	mutex_init(&buffer_mutex);
+
 	ret = dell_setup_rfkill();
 
 	if (ret) {
@@ -475,13 +516,13 @@ static int __init dell_init(void)
 		return 0;
 #endif
 
-	memset(&buffer, 0, sizeof(struct calling_interface_buffer));
-	buffer.input[0] = find_token_location(BRIGHTNESS_TOKEN);
-
-	if (buffer.input[0] != -1) {
-		dell_send_request(&buffer, 0, 2);
-		max_intensity = buffer.output[3];
+	get_buffer();
+	buffer->input[0] = find_token_location(BRIGHTNESS_TOKEN);
+	if (buffer->input[0] != -1) {
+		dell_send_request(buffer, 0, 2);
+		max_intensity = buffer->output[3];
 	}
+	release_buffer();
 
 	if (max_intensity) {
 		dell_backlight_device = backlight_device_register(
@@ -508,6 +549,8 @@ fail_backlight:
 fail_filter:
 	dell_cleanup_rfkill();
 fail_rfkill:
+	free_page((unsigned long)bufferpage);
+fail_buffer:
 	platform_device_del(platform_device);
 fail_platform_device2:
 	platform_device_put(platform_device);
@@ -529,6 +572,7 @@ static void __exit dell_exit(void)
 		platform_driver_unregister(&platform_driver);
 	}
 	kfree(da_tokens);
+	free_page((unsigned long)buffer);
 }
 
 module_init(dell_init);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 10/14] dell-laptop: Pay attention to which devices the hardware switch controls
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (8 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 11/14] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Matthew Garrett
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett

Right now, we assume that the hardware rfkill switch on Dells toggles all
radio devices. In fact, this can be configured in the BIOS and so right
now we may mark a device as hardware killed even when it isn't. Add code
to query the devices controlled by the switch, and use this when
determining the hardware kill state of a radio.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/dell-laptop.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 1a0bfd4..04b2ddb 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -128,6 +128,8 @@ static struct calling_interface_buffer *buffer;
 struct page *bufferpage;
 DEFINE_MUTEX(buffer_mutex);
 
+static int hwswitch_state;
+
 static void get_buffer(void)
 {
 	mutex_lock(&buffer_mutex);
@@ -217,6 +219,8 @@ dell_send_request(struct calling_interface_buffer *buffer, int class,
 /* Derived from information in DellWirelessCtl.cpp:
    Class 17, select 11 is radio control. It returns an array of 32-bit values.
 
+   Input byte 0 = 0: Wireless information
+
    result[0]: return code
    result[1]:
      Bit 0:      Hardware switch supported
@@ -237,18 +241,35 @@ dell_send_request(struct calling_interface_buffer *buffer, int class,
      Bits 20-31: Reserved
    result[2]: NVRAM size in bytes
    result[3]: NVRAM format version number
+
+   Input byte 0 = 2: Wireless switch configuration
+   result[0]: return code
+   result[1]:
+     Bit 0:      Wifi controlled by switch
+     Bit 1:      Bluetooth controlled by switch
+     Bit 2:      WWAN controlled by switch
+     Bits 3-6:   Reserved
+     Bit 7:      Wireless switch config locked
+     Bit 8:      Wifi locator enabled
+     Bits 9-14:  Reserved
+     Bit 15:     Wifi locator setting locked
+     Bits 16-31: Reserved
 */
 
 static int dell_rfkill_set(void *data, bool blocked)
 {
 	int disable = blocked ? 1 : 0;
 	unsigned long radio = (unsigned long)data;
+	int hwswitch_bit = (unsigned long)data - 1;
 	int ret = 0;
 
 	get_buffer();
 	dell_send_request(buffer, 17, 11);
 
-	if (!(buffer->output[1] & BIT(16))) {
+	/* If the hardware switch controls this radio, and the hardware
+	   switch is disabled, don't allow changing the software state */
+	if ((hwswitch_state & BIT(hwswitch_bit)) &&
+	    !(buffer->output[1] & BIT(16))) {
 		ret = -EINVAL;
 		goto out;
 	}
@@ -265,6 +286,7 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
 {
 	int status;
 	int bit = (unsigned long)data + 16;
+	int hwswitch_bit = (unsigned long)data - 1;
 
 	get_buffer();
 	dell_send_request(buffer, 17, 11);
@@ -272,7 +294,9 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
 	release_buffer();
 
 	rfkill_set_sw_state(rfkill, !!(status & BIT(bit)));
-	rfkill_set_hw_state(rfkill, !(status & BIT(16)));
+
+	if (hwswitch_state & (BIT(hwswitch_bit)))
+		rfkill_set_hw_state(rfkill, !(status & BIT(16)));
 }
 
 static const struct rfkill_ops dell_rfkill_ops = {
@@ -306,6 +330,9 @@ static int __init dell_setup_rfkill(void)
 	get_buffer();
 	dell_send_request(buffer, 17, 11);
 	status = buffer->output[1];
+	buffer->input[0] = 0x2;
+	dell_send_request(buffer, 17, 11);
+	hwswitch_state = buffer->output[1];
 	release_buffer();
 
 	if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 11/14] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (9 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 10/14] dell-laptop: Pay attention to which devices the hardware switch controls Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 12/14] dell-laptop: Add another Dell laptop to the DMI whitelist Matthew Garrett
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Thadeu Lima de Souza Cascardo

From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

Instead of a MODULE_DEVICE_TABLE for every acpi_driver ids table, we
create a table containing all ids to export to get a module alias for
each one.

This will fix automatic loading of the driver when one of the ACPI
devices is not present (like the accelerometer, which is not present in
some models).

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
---
 drivers/platform/x86/classmate-laptop.c |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index ed90082..8cb20e4 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -34,6 +34,11 @@ struct cmpc_accel {
 #define CMPC_ACCEL_SENSITIVITY_DEFAULT		5
 
 
+#define CMPC_ACCEL_HID		"ACCE0000"
+#define CMPC_TABLET_HID		"TBLT0000"
+#define CMPC_BL_HID		"IPML200"
+#define CMPC_KEYS_HID		"FnBT0000"
+
 /*
  * Generic input device code.
  */
@@ -282,10 +287,9 @@ static int cmpc_accel_remove(struct acpi_device *acpi, int type)
 }
 
 static const struct acpi_device_id cmpc_accel_device_ids[] = {
-	{"ACCE0000", 0},
+	{CMPC_ACCEL_HID, 0},
 	{"", 0}
 };
-MODULE_DEVICE_TABLE(acpi, cmpc_accel_device_ids);
 
 static struct acpi_driver cmpc_accel_acpi_driver = {
 	.owner = THIS_MODULE,
@@ -366,10 +370,9 @@ static int cmpc_tablet_resume(struct acpi_device *acpi)
 }
 
 static const struct acpi_device_id cmpc_tablet_device_ids[] = {
-	{"TBLT0000", 0},
+	{CMPC_TABLET_HID, 0},
 	{"", 0}
 };
-MODULE_DEVICE_TABLE(acpi, cmpc_tablet_device_ids);
 
 static struct acpi_driver cmpc_tablet_acpi_driver = {
 	.owner = THIS_MODULE,
@@ -477,17 +480,16 @@ static int cmpc_bl_remove(struct acpi_device *acpi, int type)
 	return 0;
 }
 
-static const struct acpi_device_id cmpc_device_ids[] = {
-	{"IPML200", 0},
+static const struct acpi_device_id cmpc_bl_device_ids[] = {
+	{CMPC_BL_HID, 0},
 	{"", 0}
 };
-MODULE_DEVICE_TABLE(acpi, cmpc_device_ids);
 
 static struct acpi_driver cmpc_bl_acpi_driver = {
 	.owner = THIS_MODULE,
 	.name = "cmpc",
 	.class = "cmpc",
-	.ids = cmpc_device_ids,
+	.ids = cmpc_bl_device_ids,
 	.ops = {
 		.add = cmpc_bl_add,
 		.remove = cmpc_bl_remove
@@ -540,10 +542,9 @@ static int cmpc_keys_remove(struct acpi_device *acpi, int type)
 }
 
 static const struct acpi_device_id cmpc_keys_device_ids[] = {
-	{"FnBT0000", 0},
+	{CMPC_KEYS_HID, 0},
 	{"", 0}
 };
-MODULE_DEVICE_TABLE(acpi, cmpc_keys_device_ids);
 
 static struct acpi_driver cmpc_keys_acpi_driver = {
 	.owner = THIS_MODULE,
@@ -607,3 +608,13 @@ static void cmpc_exit(void)
 
 module_init(cmpc_init);
 module_exit(cmpc_exit);
+
+static const struct acpi_device_id cmpc_device_ids[] = {
+	{CMPC_ACCEL_HID, 0},
+	{CMPC_TABLET_HID, 0},
+	{CMPC_BL_HID, 0},
+	{CMPC_KEYS_HID, 0},
+	{"", 0}
+};
+
+MODULE_DEVICE_TABLE(acpi, cmpc_device_ids);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 12/14] dell-laptop: Add another Dell laptop to the DMI whitelist
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (10 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 11/14] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-26 15:18 ` [PATCH 13/14] hp-wmi: Add support for tablet rotation key Matthew Garrett
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Erik Andren

From: Erik Andren <erik.andren@gmail.com>

The Latitude C640 has another variation of dell in its DMI vendor entry.
Add it to the whitelist in order to enjoy the sweet fruits of software
backlight toggling.

Signed-off-by: Erik Andren <erik.andren@gmail.com>
---
 drivers/platform/x86/dell-laptop.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 04b2ddb..b7f4d27 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -81,6 +81,13 @@ static const struct dmi_system_id __initdata dell_device_table[] = {
 			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
 		},
 	},
+	{
+		.ident = "Dell Computer Corporation",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+			DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
+		},
+	},
 	{ }
 };
 
@@ -609,3 +616,4 @@ MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
 MODULE_DESCRIPTION("Dell laptop driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("dmi:*svnDellInc.:*:ct8:*");
+MODULE_ALIAS("dmi:*svnDellComputerCorporation.:*:ct8:*");
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 13/14] hp-wmi: Add support for tablet rotation key
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (11 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 12/14] dell-laptop: Add another Dell laptop to the DMI whitelist Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-27  8:12   ` Dmitry Torokhov
  2010-02-26 15:18 ` [PATCH 14/14] toshiba_acpi: Add full hotkey support Matthew Garrett
                   ` (3 subsequent siblings)
  16 siblings, 1 reply; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett

The HP touchsmart tablet has a key for rotating the UI from landscape to
portrait. Add support for it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
 drivers/platform/x86/hp-wmi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ad4c414..3aa57da 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -89,6 +89,7 @@ static struct key_entry hp_wmi_keymap[] = {
 	{KE_KEY, 0x20e6, KEY_PROG1},
 	{KE_KEY, 0x2142, KEY_MEDIA},
 	{KE_KEY, 0x213b, KEY_INFO},
+	{KE_KEY, 0x2169, KEY_DIRECTION},
 	{KE_KEY, 0x231b, KEY_HELP},
 	{KE_END, 0}
 };
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH 14/14] toshiba_acpi: Add full hotkey support
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (12 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 13/14] hp-wmi: Add support for tablet rotation key Matthew Garrett
@ 2010-02-26 15:18 ` Matthew Garrett
  2010-02-27  0:07 ` [GIT PULL] x86 platform drivers tree Henrique de Moraes Holschuh
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-02-26 15:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Matthew Garrett, Andrew Morton, Len Brown

Calling the ENAB method on Toshiba laptops results in notifications being
sent when laptop hotkeys are pressed.  This patch simply calls that method
and sets up an input device if it's successful.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/platform/x86/toshiba_acpi.c |  206 +++++++++++++++++++++++++++++++++-
 1 files changed, 199 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 77bf5d8..26c2117 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -46,6 +46,7 @@
 #include <linux/backlight.h>
 #include <linux/platform_device.h>
 #include <linux/rfkill.h>
+#include <linux/input.h>
 
 #include <asm/uaccess.h>
 
@@ -62,9 +63,10 @@ MODULE_LICENSE("GPL");
 
 /* Toshiba ACPI method paths */
 #define METHOD_LCD_BRIGHTNESS	"\\_SB_.PCI0.VGA_.LCD_._BCM"
-#define METHOD_HCI_1		"\\_SB_.VALD.GHCI"
-#define METHOD_HCI_2		"\\_SB_.VALZ.GHCI"
+#define TOSH_INTERFACE_1	"\\_SB_.VALD"
+#define TOSH_INTERFACE_2	"\\_SB_.VALZ"
 #define METHOD_VIDEO_OUT	"\\_SB_.VALX.DSSX"
+#define GHCI_METHOD		".GHCI"
 
 /* Toshiba HCI interface definitions
  *
@@ -116,6 +118,36 @@ static const struct acpi_device_id toshiba_device_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, toshiba_device_ids);
 
+struct key_entry {
+	char type;
+	u16 code;
+	u16 keycode;
+};
+
+enum {KE_KEY, KE_END};
+
+static struct key_entry toshiba_acpi_keymap[]  = {
+	{KE_KEY, 0x101, KEY_MUTE},
+	{KE_KEY, 0x13b, KEY_COFFEE},
+	{KE_KEY, 0x13c, KEY_BATTERY},
+	{KE_KEY, 0x13d, KEY_SLEEP},
+	{KE_KEY, 0x13e, KEY_SUSPEND},
+	{KE_KEY, 0x13f, KEY_SWITCHVIDEOMODE},
+	{KE_KEY, 0x140, KEY_BRIGHTNESSDOWN},
+	{KE_KEY, 0x141, KEY_BRIGHTNESSUP},
+	{KE_KEY, 0x142, KEY_WLAN},
+	{KE_KEY, 0x143, KEY_PROG1},
+	{KE_KEY, 0xb05, KEY_PROG2},
+	{KE_KEY, 0xb06, KEY_WWW},
+	{KE_KEY, 0xb07, KEY_MAIL},
+	{KE_KEY, 0xb30, KEY_STOP},
+	{KE_KEY, 0xb31, KEY_PREVIOUSSONG},
+	{KE_KEY, 0xb32, KEY_NEXTSONG},
+	{KE_KEY, 0xb33, KEY_PLAYPAUSE},
+	{KE_KEY, 0xb5a, KEY_MEDIA},
+	{KE_END, 0, 0},
+};
+
 /* utility
  */
 
@@ -251,6 +283,8 @@ static acpi_status hci_read2(u32 reg, u32 *out1, u32 *out2, u32 *result)
 struct toshiba_acpi_dev {
 	struct platform_device *p_dev;
 	struct rfkill *bt_rfk;
+	struct input_dev *hotkey_dev;
+	acpi_handle handle;
 
 	const char *bt_name;
 
@@ -711,8 +745,159 @@ static struct backlight_ops toshiba_backlight_data = {
         .update_status  = set_lcd_status,
 };
 
+static struct key_entry *toshiba_acpi_get_entry_by_scancode(int code)
+{
+	struct key_entry *key;
+
+	for (key = toshiba_acpi_keymap; key->type != KE_END; key++)
+		if (code == key->code)
+			return key;
+
+	return NULL;
+}
+
+static struct key_entry *toshiba_acpi_get_entry_by_keycode(int code)
+{
+	struct key_entry *key;
+
+	for (key = toshiba_acpi_keymap; key->type != KE_END; key++)
+		if (code == key->keycode && key->type == KE_KEY)
+			return key;
+
+	return NULL;
+}
+
+static int toshiba_acpi_getkeycode(struct input_dev *dev, int scancode,
+				   int *keycode)
+{
+	struct key_entry *key = toshiba_acpi_get_entry_by_scancode(scancode);
+
+	if (key && key->type == KE_KEY) {
+		*keycode = key->keycode;
+		return 0;
+	}
+
+	return -EINVAL;
+}
+
+static int toshiba_acpi_setkeycode(struct input_dev *dev, int scancode,
+				   int keycode)
+{
+	struct key_entry *key;
+	int old_keycode;
+
+	if (keycode < 0 || keycode > KEY_MAX)
+		return -EINVAL;
+
+	key = toshiba_acpi_get_entry_by_scancode(scancode);
+	if (key && key->type == KE_KEY) {
+		old_keycode = key->keycode;
+		key->keycode = keycode;
+		set_bit(keycode, dev->keybit);
+		if (!toshiba_acpi_get_entry_by_keycode(old_keycode))
+			clear_bit(old_keycode, dev->keybit);
+		return 0;
+	}
+
+	return -EINVAL;
+}
+
+static void toshiba_acpi_notify(acpi_handle handle, u32 event, void *context)
+{
+	u32 hci_result, value;
+	struct key_entry *key;
+
+	if (event != 0x80)
+		return;
+	do {
+		hci_read1(HCI_SYSTEM_EVENT, &value, &hci_result);
+		if (hci_result == HCI_SUCCESS) {
+			if (value == 0x100)
+				continue;
+			else if (value & 0x80) {
+				key = toshiba_acpi_get_entry_by_scancode
+					(value & ~0x80);
+				if (!key) {
+					printk(MY_INFO "Unknown key %x\n",
+					       value & ~0x80);
+					continue;
+				}
+				input_report_key(toshiba_acpi.hotkey_dev,
+						 key->keycode, 1);
+				input_sync(toshiba_acpi.hotkey_dev);
+				input_report_key(toshiba_acpi.hotkey_dev,
+						 key->keycode, 0);
+				input_sync(toshiba_acpi.hotkey_dev);
+			}
+		} else if (hci_result == HCI_NOT_SUPPORTED) {
+			/* This is a workaround for an unresolved issue on
+			 * some machines where system events sporadically
+			 * become disabled. */
+			hci_write1(HCI_SYSTEM_EVENT, 1, &hci_result);
+			printk(MY_NOTICE "Re-enabled hotkeys\n");
+		}
+	} while (hci_result != HCI_EMPTY);
+}
+
+static int toshiba_acpi_setup_keyboard(char *device)
+{
+	acpi_status status;
+	acpi_handle handle;
+	int result;
+	const struct key_entry *key;
+
+	status = acpi_get_handle(NULL, device, &handle);
+	if (ACPI_FAILURE(status)) {
+		printk(MY_INFO "Unable to get notification device\n");
+		return -ENODEV;
+	}
+
+	toshiba_acpi.handle = handle;
+
+	status = acpi_evaluate_object(handle, "ENAB", NULL, NULL);
+	if (ACPI_FAILURE(status)) {
+		printk(MY_INFO "Unable to enable hotkeys\n");
+		return -ENODEV;
+	}
+
+	status = acpi_install_notify_handler(handle, ACPI_DEVICE_NOTIFY,
+					      toshiba_acpi_notify, NULL);
+	if (ACPI_FAILURE(status)) {
+		printk(MY_INFO "Unable to install hotkey notification\n");
+		return -ENODEV;
+	}
+
+	toshiba_acpi.hotkey_dev = input_allocate_device();
+	if (!toshiba_acpi.hotkey_dev) {
+		printk(MY_INFO "Unable to register input device\n");
+		return -ENOMEM;
+	}
+
+	toshiba_acpi.hotkey_dev->name = "Toshiba input device";
+	toshiba_acpi.hotkey_dev->phys = device;
+	toshiba_acpi.hotkey_dev->id.bustype = BUS_HOST;
+	toshiba_acpi.hotkey_dev->getkeycode = toshiba_acpi_getkeycode;
+	toshiba_acpi.hotkey_dev->setkeycode = toshiba_acpi_setkeycode;
+
+	for (key = toshiba_acpi_keymap; key->type != KE_END; key++) {
+		set_bit(EV_KEY, toshiba_acpi.hotkey_dev->evbit);
+		set_bit(key->keycode, toshiba_acpi.hotkey_dev->keybit);
+	}
+
+	result = input_register_device(toshiba_acpi.hotkey_dev);
+	if (result) {
+		printk(MY_INFO "Unable to register input device\n");
+		return result;
+	}
+
+	return 0;
+}
+
 static void toshiba_acpi_exit(void)
 {
+	if (toshiba_acpi.hotkey_dev)
+		input_unregister_device(toshiba_acpi.hotkey_dev);
+
 	if (toshiba_acpi.bt_rfk) {
 		rfkill_unregister(toshiba_acpi.bt_rfk);
 		rfkill_destroy(toshiba_acpi.bt_rfk);
@@ -726,6 +911,9 @@ static void toshiba_acpi_exit(void)
 	if (toshiba_proc_dir)
 		remove_proc_entry(PROC_TOSHIBA, acpi_root_dir);
 
+	acpi_remove_notify_handler(toshiba_acpi.handle, ACPI_DEVICE_NOTIFY,
+				   toshiba_acpi_notify);
+
 	platform_device_unregister(toshiba_acpi.p_dev);
 
 	return;
@@ -742,11 +930,15 @@ static int __init toshiba_acpi_init(void)
 		return -ENODEV;
 
 	/* simple device detection: look for HCI method */
-	if (is_valid_acpi_path(METHOD_HCI_1))
-		method_hci = METHOD_HCI_1;
-	else if (is_valid_acpi_path(METHOD_HCI_2))
-		method_hci = METHOD_HCI_2;
-	else
+	if (is_valid_acpi_path(TOSH_INTERFACE_1 GHCI_METHOD)) {
+		method_hci = TOSH_INTERFACE_1 GHCI_METHOD;
+		if (toshiba_acpi_setup_keyboard(TOSH_INTERFACE_1))
+			printk(MY_INFO "Unable to activate hotkeys\n");
+	} else if (is_valid_acpi_path(TOSH_INTERFACE_2 GHCI_METHOD)) {
+		method_hci = TOSH_INTERFACE_2 GHCI_METHOD;
+		if (toshiba_acpi_setup_keyboard(TOSH_INTERFACE_2))
+			printk(MY_INFO "Unable to activate hotkeys\n");
+	} else
 		return -ENODEV;
 
 	printk(MY_INFO "Toshiba Laptop ACPI Extras version %s\n",
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
@ 2010-02-26 16:18   ` Thadeu Lima de Souza Cascardo
  2010-02-26 16:39   ` Anisse Astier
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 34+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2010-02-26 16:18 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: torvalds, linux-kernel, Anisse Astier, Carlos Corbacho,
	Cezary Jackiewicz, Corentin Chary, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Len Brown, Lennart Poettering, Mattia Dongili, Peter Feuerer,
	Sujith Thomas

[-- Attachment #1: Type: text/plain, Size: 7315 bytes --]

On Fri, Feb 26, 2010 at 10:18:34AM -0500, Matthew Garrett wrote:
> Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
> it's kind of inappropriate for them to be stuck under the ACPI mailing
> list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
> with Len's blessing, add myself as subsystem maintainer.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: Anisse Astier <anisse@astier.eu>
> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
> Cc: Corentin Chary <corentincj@iksaif.net>
> Cc: Daniel Oliveira Nascimento <don@syst.com.br>
> Cc: Harald Welte <laforge@gnumonks.org>
> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
> Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> Cc: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
> Cc: Karol Kozimor <sziwan@users.sourceforge.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Lennart Poettering <mzxreary@0pointer.de>
> Cc: Mattia Dongili <malattia@linux.it>
> Cc: Peter Feuerer <peter@piie.net>
> Cc: Sujith Thomas <sujith.thomas@intel.com>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> ---
>  MAINTAINERS |   29 +++++++++++++++++++++++++----
>  1 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2533fc4..f355d11 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -221,6 +221,7 @@ F:	drivers/net/acenic*
>  
>  ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER
>  M:	Peter Feuerer <peter@piie.net>
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://piie.net/?section=acerhdf
>  S:	Maintained
>  F:	drivers/platform/x86/acerhdf.c
> @@ -228,6 +229,7 @@ F:	drivers/platform/x86/acerhdf.c
>  ACER WMI LAPTOP EXTRAS
>  M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
>  L:	aceracpi@googlegroups.com (subscribers-only)
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://code.google.com/p/aceracpi
>  S:	Maintained
>  F:	drivers/platform/x86/acer-wmi.c
> @@ -288,7 +290,7 @@ F:	drivers/acpi/video.c
>  
>  ACPI WMI DRIVER
>  M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
> -L:	linux-acpi@vger.kernel.org
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://www.lesswatts.org/projects/acpi/
>  S:	Maintained
>  F:	drivers/platform/x86/wmi.c
> @@ -968,6 +970,7 @@ ASUS ACPI EXTRAS DRIVER
>  M:	Corentin Chary <corentincj@iksaif.net>
>  M:	Karol Kozimor <sziwan@users.sourceforge.net>
>  L:	acpi4asus-user@lists.sourceforge.net
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://acpi4asus.sf.net
>  S:	Maintained
>  F:	drivers/platform/x86/asus_acpi.c
> @@ -981,6 +984,7 @@ F:	drivers/hwmon/asb100.c
>  ASUS LAPTOP EXTRAS DRIVER
>  M:	Corentin Chary <corentincj@iksaif.net>
>  L:	acpi4asus-user@lists.sourceforge.net
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://acpi4asus.sf.net
>  S:	Maintained
>  F:	drivers/platform/x86/asus-laptop.c
> @@ -1473,6 +1477,7 @@ F:	drivers/scsi/fnic/
>  CMPC ACPI DRIVER
>  M:	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
>  M:	Daniel Oliveira Nascimento <don@syst.com.br>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Supported
>  F:	drivers/platform/x86/classmate-laptop.c
>  

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

Thank you very much for this. I was hoping for something like that.

> @@ -1516,6 +1521,7 @@ F:	drivers/pci/hotplug/cpcihp_generic.c
>  
>  COMPAL LAPTOP SUPPORT
>  M:	Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/compal-laptop.c
>  
> @@ -1746,6 +1752,7 @@ F:	drivers/net/defxx.*
>  
>  DELL LAPTOP DRIVER
>  M:	Matthew Garrett <mjg59@srcf.ucam.org>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/dell-laptop.c
>  
> @@ -2028,6 +2035,7 @@ F:	drivers/edac/r82600_edac.c
>  EEEPC LAPTOP EXTRAS DRIVER
>  M:	Corentin Chary <corentincj@iksaif.net>
>  L:	acpi4asus-user@lists.sourceforge.net
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://acpi4asus.sf.net
>  S:	Maintained
>  F:	drivers/platform/x86/eeepc-laptop.c
> @@ -2295,7 +2303,7 @@ F:	arch/frv/
>  
>  FUJITSU LAPTOP EXTRAS
>  M:	Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
> -L:	linux-acpi@vger.kernel.org
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/fujitsu-laptop.c
>  
> @@ -2561,6 +2569,7 @@ F:	drivers/net/wireless/hostap/
>  
>  HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
>  M:	Carlos Corbacho <carlos@strangeworlds.co.uk>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Odd Fixes
>  F:	drivers/platform/x86/tc1100-wmi.c
>  
> @@ -2771,7 +2780,7 @@ F:	drivers/video/i810/
>  
>  INTEL MENLOW THERMAL DRIVER
>  M:	Sujith Thomas <sujith.thomas@intel.com>
> -L:	linux-acpi@vger.kernel.org
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://www.lesswatts.org/projects/acpi/
>  S:	Supported
>  F:	drivers/platform/x86/intel_menlow.c
> @@ -3637,6 +3646,7 @@ F:	drivers/char/mxser.*
>  
>  MSI LAPTOP SUPPORT
>  M:	Lennart Poettering <mzxreary@0pointer.de>
> +L:	platform-driver-x86@vger.kernel.org
>  W:	https://tango.0pointer.de/mailman/listinfo/s270-linux
>  W:	http://0pointer.de/lennart/tchibo.html
>  S:	Maintained
> @@ -3644,6 +3654,7 @@ F:	drivers/platform/x86/msi-laptop.c
>  
>  MSI WMI SUPPORT
>  M:	Anisse Astier <anisse@astier.eu>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Supported
>  F:	drivers/platform/x86/msi-wmi.c
>  
> @@ -4096,6 +4107,7 @@ F:	drivers/i2c/busses/i2c-pasemi.c
>  
>  PANASONIC LAPTOP ACPI EXTRAS DRIVER
>  M:	Harald Welte <laforge@gnumonks.org>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/panasonic-laptop.c
>  
> @@ -5034,7 +5046,7 @@ F:	include/linux/ssb/
>  
>  SONY VAIO CONTROL DEVICE DRIVER
>  M:	Mattia Dongili <malattia@linux.it>
> -L:	linux-acpi@vger.kernel.org
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://www.linux.it/~malattia/wiki/index.php/Sony_drivers
>  S:	Maintained
>  F:	Documentation/laptops/sony-laptop.txt
> @@ -5240,6 +5252,7 @@ F:	arch/xtensa/
>  THINKPAD ACPI EXTRAS DRIVER
>  M:	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
>  L:	ibm-acpi-devel@lists.sourceforge.net
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://ibm-acpi.sourceforge.net
>  W:	http://thinkwiki.org/wiki/Ibm-acpi
>  T:	git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
> @@ -5293,10 +5306,12 @@ F:	security/tomoyo/
>  
>  TOPSTAR LAPTOP EXTRAS DRIVER
>  M:	Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/topstar-laptop.c
>  
>  TOSHIBA ACPI EXTRAS DRIVER
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Orphan
>  F:	drivers/platform/x86/toshiba_acpi.c
>  
> @@ -6024,6 +6039,12 @@ S:	Maintained
>  F:	Documentation/x86/
>  F:	arch/x86/
>  
> +X86 PLATFORM DRIVERS
> +M:	Matthew Garrett <mjg@redhat.com>
> +L:	platform-driver-x86@vger.kernel.org
> +S:	Maintained
> +F:	drivers/platform/x86
> +
>  XEN HYPERVISOR INTERFACE
>  M:	Jeremy Fitzhardinge <jeremy@xensource.com>
>  M:	Chris Wright <chrisw@sous-sol.org>
> -- 
> 1.6.6.1
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
  2010-02-26 16:18   ` Thadeu Lima de Souza Cascardo
@ 2010-02-26 16:39   ` Anisse Astier
  2010-02-26 16:44     ` Anisse Astier
  2010-02-26 21:53   ` Corentin Chary
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 34+ messages in thread
From: Anisse Astier @ 2010-02-26 16:39 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: torvalds, linux-kernel, Carlos Corbacho, Cezary Jackiewicz,
	Corentin Chary, Daniel Oliveira Nascimento, Harald Welte,
	Henrique de Moraes Holschuh, Herton Ronaldo Krzesinski,
	Jonathan Woithe, Karol Kozimor, Len Brown, Lennart Poettering,
	Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

Hi,
On Fri, 26 Feb 2010 10:18:34 -0500, Matthew Garrett <mjg@redhat.com> wrote :

> Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
> it's kind of inappropriate for them to be stuck under the ACPI mailing
> list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
> with Len's blessing, add myself as subsystem maintainer.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: Anisse Astier <anisse@astier.eu>
> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
> Cc: Corentin Chary <corentincj@iksaif.net>
> Cc: Daniel Oliveira Nascimento <don@syst.com.br>
> Cc: Harald Welte <laforge@gnumonks.org>
> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
> Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> Cc: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
> Cc: Karol Kozimor <sziwan@users.sourceforge.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Lennart Poettering <mzxreary@0pointer.de>
> Cc: Mattia Dongili <malattia@linux.it>
> Cc: Peter Feuerer <peter@piie.net>
> Cc: Sujith Thomas <sujith.thomas@intel.com>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> ---
>  MAINTAINERS |   29 +++++++++++++++++++++++++----
>  1 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2533fc4..f355d11 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -221,6 +221,7 @@ F:	drivers/net/acenic*
>  

>  
>  MSI WMI SUPPORT
>  M:	Anisse Astier <anisse@astier.eu>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Supported
>  F:	drivers/platform/x86/msi-wmi.c
>  

Great, thanks!


>  
> @@ -6024,6 +6039,12 @@ S:	Maintained
>  F:	Documentation/x86/
>  F:	arch/x86/
>  
> +X86 PLATFORM DRIVERS
> +M:	Matthew Garrett <mjg@redhat.com>
> +L:	platform-driver-x86@vger.kernel.org
> +S:	Maintained
> +F:	drivers/platform/x86
> +
>  XEN HYPERVISOR INTERFACE
>  M:	Jeremy Fitzhardinge <jeremy@xensource.com>
>  M:	Chris Wright <chrisw@sous-sol.org>


--
Anisse

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 16:39   ` Anisse Astier
@ 2010-02-26 16:44     ` Anisse Astier
  2010-02-26 23:58       ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 34+ messages in thread
From: Anisse Astier @ 2010-02-26 16:44 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: torvalds, linux-kernel, Carlos Corbacho, Cezary Jackiewicz,
	Corentin Chary, Daniel Oliveira Nascimento, Harald Welte,
	Henrique de Moraes Holschuh, Herton Ronaldo Krzesinski,
	Jonathan Woithe, Karol Kozimor, Len Brown, Lennart Poettering,
	Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo


> On Fri, 26 Feb 2010 10:18:34 -0500, Matthew Garrett <mjg@redhat.com> wrote :
> 
> >  
> > +X86 PLATFORM DRIVERS
> > +M:	Matthew Garrett <mjg@redhat.com>
> > +L:	platform-driver-x86@vger.kernel.org

By the way I noticed while registering on
http://vger.kernel.org/vger-lists.html#platform-driver-x86 that the list
does not have an archive yet.
Is it planned?

--
Anisse

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86  information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
  2010-02-26 16:18   ` Thadeu Lima de Souza Cascardo
  2010-02-26 16:39   ` Anisse Astier
@ 2010-02-26 21:53   ` Corentin Chary
  2010-03-01 17:59     ` Len Brown
  2010-02-26 23:51   ` Peter Feuerer
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 34+ messages in thread
From: Corentin Chary @ 2010-02-26 21:53 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: torvalds, linux-kernel, Anisse Astier, Carlos Corbacho,
	Cezary Jackiewicz, Daniel Oliveira Nascimento, Harald Welte,
	Henrique de Moraes Holschuh, Herton Ronaldo Krzesinski,
	Jonathan Woithe, Karol Kozimor, Len Brown, Lennart Poettering,
	Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

On Fri, Feb 26, 2010 at 4:18 PM, Matthew Garrett <mjg@redhat.com> wrote:
> Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
> it's kind of inappropriate for them to be stuck under the ACPI mailing
> list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
> with Len's blessing, add myself as subsystem maintainer.

Ok,
Should I re-send the big asus-laptop series I sent to Len (not already
in acpi tree)
and send it back to you so it can be merged in platform-driver-x86 ?

-- 
Corentin Chary
http://xf.iksaif.net

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
                     ` (2 preceding siblings ...)
  2010-02-26 21:53   ` Corentin Chary
@ 2010-02-26 23:51   ` Peter Feuerer
  2010-02-27  3:42   ` Jonathan Woithe
  2010-02-27  4:39   ` Harald Welte
  5 siblings, 0 replies; 34+ messages in thread
From: Peter Feuerer @ 2010-02-26 23:51 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: torvalds, linux-kernel, Anisse Astier, Carlos Corbacho,
	Cezary Jackiewicz, Corentin Chary, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Len Brown, Lennart Poettering, Mattia Dongili, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

Matthew Garrett writes:

> Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
> it's kind of inappropriate for them to be stuck under the ACPI mailing
> list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
> with Len's blessing, add myself as subsystem maintainer.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> Cc: Anisse Astier <anisse@astier.eu>
> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
> Cc: Corentin Chary <corentincj@iksaif.net>
> Cc: Daniel Oliveira Nascimento <don@syst.com.br>
> Cc: Harald Welte <laforge@gnumonks.org>
> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
> Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
> Cc: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
> Cc: Karol Kozimor <sziwan@users.sourceforge.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Lennart Poettering <mzxreary@0pointer.de>
> Cc: Mattia Dongili <malattia@linux.it>
> Cc: Peter Feuerer <peter@piie.net>
> Cc: Sujith Thomas <sujith.thomas@intel.com>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> ---
>  MAINTAINERS |   29 +++++++++++++++++++++++++----
>  1 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2533fc4..f355d11 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -221,6 +221,7 @@ F:	drivers/net/acenic*
>  
>  ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER
>  M:	Peter Feuerer <peter@piie.net>
> +L:	platform-driver-x86@vger.kernel.org
>  W:	http://piie.net/?section=acerhdf
>  S:	Maintained
>  F:	drivers/platform/x86/acerhdf.c

Acked-by: Peter Feuerer <peter@piie.net>

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 16:44     ` Anisse Astier
@ 2010-02-26 23:58       ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 34+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-02-26 23:58 UTC (permalink / raw)
  To: Anisse Astier
  Cc: Matthew Garrett, platform-driver-x86, torvalds, linux-kernel,
	Carlos Corbacho, Cezary Jackiewicz, Corentin Chary,
	Daniel Oliveira Nascimento, Harald Welte,
	Henrique de Moraes Holschuh, Herton Ronaldo Krzesinski,
	Jonathan Woithe, Karol Kozimor, Len Brown, Lennart Poettering,
	Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

On Fri, 26 Feb 2010, Anisse Astier wrote:
> > On Fri, 26 Feb 2010 10:18:34 -0500, Matthew Garrett <mjg@redhat.com> wrote :
> > > +X86 PLATFORM DRIVERS
> > > +M:	Matthew Garrett <mjg@redhat.com>
> > > +L:	platform-driver-x86@vger.kernel.org
> 
> By the way I noticed while registering on
> http://vger.kernel.org/vger-lists.html#platform-driver-x86 that the list
> does not have an archive yet.
> Is it planned?

I have requested archival at gmane.org, which will also forward a request to
the www.mail-archive.com so it should start being archived on both these
places soon.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [GIT PULL] x86 platform drivers tree
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (13 preceding siblings ...)
  2010-02-26 15:18 ` [PATCH 14/14] toshiba_acpi: Add full hotkey support Matthew Garrett
@ 2010-02-27  0:07 ` Henrique de Moraes Holschuh
  2010-03-01 14:45   ` Matthew Garrett
  2010-02-28 19:59 ` tip: origin tree build failure Ingo Molnar
  2010-03-02 13:56 ` [PATCH] compal-laptop: Make it depend on CONFIG_RFKILL Ingo Molnar
  16 siblings, 1 reply; 34+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-02-27  0:07 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel

I send yesterday a patchset (six patches) for thinkpad-acpi, which should
also go to stable.  Since it looks like you'll be thinkpad-acpi upstream,
will you pick them off linux-acpi and send them to Linus, or do you want me
to resend them to you?

Also, do you plan to use patchwork like we used to in linux-acpi?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
                     ` (3 preceding siblings ...)
  2010-02-26 23:51   ` Peter Feuerer
@ 2010-02-27  3:42   ` Jonathan Woithe
  2010-02-27  4:39   ` Harald Welte
  5 siblings, 0 replies; 34+ messages in thread
From: Jonathan Woithe @ 2010-02-27  3:42 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: torvalds, linux-kernel, Matthew Garrett, Anisse Astier,
	Carlos Corbacho, Cezary Jackiewicz, Corentin Chary,
	Daniel Oliveira Nascimento, Harald Welte,
	Henrique de Moraes Holschuh, Herton Ronaldo Krzesinski,
	Jonathan Woithe, Karol Kozimor, Len Brown, Lennart Poettering,
	Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

Hi Matthew

> Many of the drivers/platform/x86 drivers have nothing to do with ACPI, so
> it's kind of inappropriate for them to be stuck under the ACPI mailing
> list. Add a new mailing list (platform-driver-x86@vger.kernel.org) and,
> with Len's blessing, add myself as subsystem maintainer.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> :
>  FUJITSU LAPTOP EXTRAS
>  M:	Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
> -L:	linux-acpi@vger.kernel.org
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/fujitsu-laptop.c

Sounds fine to me.

Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

Regards
  jonathan

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
                     ` (4 preceding siblings ...)
  2010-02-27  3:42   ` Jonathan Woithe
@ 2010-02-27  4:39   ` Harald Welte
  5 siblings, 0 replies; 34+ messages in thread
From: Harald Welte @ 2010-02-27  4:39 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel

On Fri, Feb 26, 2010 at 10:18:34AM -0500, Matthew Garrett wrote:

>  PANASONIC LAPTOP ACPI EXTRAS DRIVER
>  M:	Harald Welte <laforge@gnumonks.org>
> +L:	platform-driver-x86@vger.kernel.org
>  S:	Maintained
>  F:	drivers/platform/x86/panasonic-laptop.c

fine with me, thanks.

-- 
- Harald Welte <laforge@gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 04/14] dell-laptop: Update rfkill state on kill switch
  2010-02-26 15:18 ` [PATCH 04/14] dell-laptop: Update rfkill state on kill switch Matthew Garrett
@ 2010-02-27  8:06   ` Dmitry Torokhov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Torokhov @ 2010-02-27  8:06 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel

Hi Matthew,

On Fri, Feb 26, 2010 at 10:18:37AM -0500, Matthew Garrett wrote:
> +
>  static int __init dell_init(void)
>  {
>  	struct calling_interface_buffer buffer;
> @@ -373,6 +410,13 @@ static int __init dell_init(void)
>  		goto fail_rfkill;
>  	}
>  
> +	ret = i8042_install_filter(dell_laptop_i8042_filter);
> +	if (ret) {
> +		printk(KERN_WARNING
> +		       "dell-laptop: Unable to install key filter\n");
> +		goto fail_filter;
> +	}
> +
>  #ifdef CONFIG_ACPI
>  	/* In the event of an ACPI backlight being available, don't
>  	 * register the platform controller.
> @@ -410,6 +454,8 @@ static int __init dell_init(void)
>  	return 0;
>  
>  fail_backlight:
> +	i8042_remove_filter(dell_laptop_i8042_filter);

cancel_delayed_work_sync() is missing.

> +fail_filter:
>  	dell_cleanup_rfkill();
>  fail_rfkill:
>  	platform_device_del(platform_device);
> @@ -424,6 +470,8 @@ fail_platform_driver:
>  
>  static void __exit dell_exit(void)
>  {
> +	cancel_delayed_work_sync(&dell_rfkill_work);
> +	i8042_remove_filter(dell_laptop_i8042_filter);

Wrong order, you need to unregister filter first.

>  	backlight_device_unregister(dell_backlight_device);
>  	dell_cleanup_rfkill();

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 05/14] dell-laptop: Fix platform device unregistration
  2010-02-26 15:18 ` [PATCH 05/14] dell-laptop: Fix platform device unregistration Matthew Garrett
@ 2010-02-27  8:09   ` Dmitry Torokhov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Torokhov @ 2010-02-27  8:09 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel

On Fri, Feb 26, 2010 at 10:18:38AM -0500, Matthew Garrett wrote:
> dell-laptop currently fails to clean up its platform device correctly.
> Make sure that it's unregistered.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
>  drivers/platform/x86/dell-laptop.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index 9d7e0be..b4c2190 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -474,6 +474,10 @@ static void __exit dell_exit(void)
>  	i8042_remove_filter(dell_laptop_i8042_filter);
>  	backlight_device_unregister(dell_backlight_device);
>  	dell_cleanup_rfkill();
> +	if (platform_device) {
> +		platform_device_del(platform_device);

That should be platform_device_unregister(), otherwise you are missing
final platform_device_put().

> +		platform_driver_unregister(&platform_driver);
> +	}
>  }
>  

-- 
Dmitry

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address
  2010-02-26 15:18 ` [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address Matthew Garrett
@ 2010-02-27  8:11   ` Dmitry Torokhov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Torokhov @ 2010-02-27  8:11 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel, Stuart Hayes

On Fri, Feb 26, 2010 at 10:18:42AM -0500, Matthew Garrett wrote:
> From: Stuart Hayes <stuart_hayes@dell.com>
> 
> Calls to communicate with system firmware via a SMI (using dcdbas)
> need to use a buffer that has a physical address of 4GB or less.
> Currently the dell-laptop driver does not guarantee this, and when the
> buffer address is higher than 4GB, the address is truncated to 32 bits
> and the SMI handler writes to the wrong memory address.
> 
> Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
> Acked-by: Matthew Garrett <mjg@redhat.com>
> ---
>  drivers/platform/x86/dell-laptop.c |  122 ++++++++++++++++++++++++-----------
>  1 files changed, 83 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
> index d8b1b39..1a0bfd4 100644
> --- a/drivers/platform/x86/dell-laptop.c
> +++ b/drivers/platform/x86/dell-laptop.c
> @@ -22,6 +22,7 @@
>  #include <linux/rfkill.h>
>  #include <linux/power_supply.h>
>  #include <linux/acpi.h>
> +#include <linux/mm.h>
>  #include <linux/i8042.h>
>  #include "../../firmware/dcdbas.h"
>  
> @@ -123,6 +124,21 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = {
>  	{}
>  };
>  
> +static struct calling_interface_buffer *buffer;
> +struct page *bufferpage;

static ?

> +DEFINE_MUTEX(buffer_mutex);

static?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 13/14] hp-wmi: Add support for tablet rotation key
  2010-02-26 15:18 ` [PATCH 13/14] hp-wmi: Add support for tablet rotation key Matthew Garrett
@ 2010-02-27  8:12   ` Dmitry Torokhov
  0 siblings, 0 replies; 34+ messages in thread
From: Dmitry Torokhov @ 2010-02-27  8:12 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel

On Fri, Feb 26, 2010 at 10:18:46AM -0500, Matthew Garrett wrote:
> The HP touchsmart tablet has a key for rotating the UI from landscape to
> portrait. Add support for it.
> 
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
>  drivers/platform/x86/hp-wmi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
> index ad4c414..3aa57da 100644
> --- a/drivers/platform/x86/hp-wmi.c
> +++ b/drivers/platform/x86/hp-wmi.c
> @@ -89,6 +89,7 @@ static struct key_entry hp_wmi_keymap[] = {
>  	{KE_KEY, 0x20e6, KEY_PROG1},
>  	{KE_KEY, 0x2142, KEY_MEDIA},
>  	{KE_KEY, 0x213b, KEY_INFO},
> +	{KE_KEY, 0x2169, KEY_DIRECTION},

I'd appreciate a patch for input.h commenting on intended use of
KEY_DIRECTION.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 34+ messages in thread

* tip: origin tree build failure
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (14 preceding siblings ...)
  2010-02-27  0:07 ` [GIT PULL] x86 platform drivers tree Henrique de Moraes Holschuh
@ 2010-02-28 19:59 ` Ingo Molnar
  2010-03-02 13:56 ` [PATCH] compal-laptop: Make it depend on CONFIG_RFKILL Ingo Molnar
  16 siblings, 0 replies; 34+ messages in thread
From: Ingo Molnar @ 2010-02-28 19:59 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel


* Matthew Garrett <mjg@redhat.com> wrote:

>       dell-laptop: Use buffer with 32-bit physical address

Hi, this commit introduced an allyesconfig build bug - fixed via the patch 
below.

Thanks,

	Ingo

------------------>
>From 03894dc8462f82c145ec1c3aced9b0718ae4e9ed Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Sun, 28 Feb 2010 20:55:41 +0100
Subject: [PATCH] dell-laptop: Fix build error by making buffer_mutex static

The following build bug (x86, allyesconfig):

  arch/x86/oprofile/built-in.o:(.data+0x250): multiple definition of `buffer_mutex'

Was triggered in -tip testing, caused by this upstream commit:

  116ee77: dell-laptop: Use buffer with 32-bit physical address

There's multiple buffer_mutex's in the kernel. Make this new one
static.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/platform/x86/dell-laptop.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index b7f4d27..29d96a4 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -132,8 +132,8 @@ static struct dmi_system_id __devinitdata dell_blacklist[] = {
 };
 
 static struct calling_interface_buffer *buffer;
-struct page *bufferpage;
-DEFINE_MUTEX(buffer_mutex);
+static struct page *bufferpage;
+static DEFINE_MUTEX(buffer_mutex);
 
 static int hwswitch_state;
 

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [GIT PULL] x86 platform drivers tree
  2010-02-27  0:07 ` [GIT PULL] x86 platform drivers tree Henrique de Moraes Holschuh
@ 2010-03-01 14:45   ` Matthew Garrett
  0 siblings, 0 replies; 34+ messages in thread
From: Matthew Garrett @ 2010-03-01 14:45 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh; +Cc: linux-kernel

I'll pick those up off linux-acpi. Thanks!

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-02-26 21:53   ` Corentin Chary
@ 2010-03-01 17:59     ` Len Brown
  2010-03-01 18:02       ` Matthew Garrett
  0 siblings, 1 reply; 34+ messages in thread
From: Len Brown @ 2010-03-01 17:59 UTC (permalink / raw)
  To: Corentin Chary
  Cc: Matthew Garrett, torvalds, linux-kernel, Anisse Astier,
	Carlos Corbacho, Cezary Jackiewicz, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Lennart Poettering, Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

On Fri, 26 Feb 2010, Corentin Chary wrote:

> On Fri, Feb 26, 2010 at 4:18 PM, Matthew Garrett <mjg@redhat.com> wrote:

> > Add a new mailing list (platform-driver-x86@vger.kernel.org)

> Ok,
> Should I re-send the big asus-laptop series I sent to Len (not already
> in acpi tree) and send it back to you so it can be merged in platform-driver-x86 ?

It looks like Matthew didn't send this up, so I've appended it
to an asus branch in my tree (I had Roel Kluin's "remove duplicate 
comparison" patch sitting in there).

Matthew,
Unless you object, I'll send Corentin's asus-laptop cleanup
upstream with my treek.

thanks,
Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-03-01 17:59     ` Len Brown
@ 2010-03-01 18:02       ` Matthew Garrett
  2010-03-01 18:23         ` Len Brown
  0 siblings, 1 reply; 34+ messages in thread
From: Matthew Garrett @ 2010-03-01 18:02 UTC (permalink / raw)
  To: Len Brown
  Cc: Corentin Chary, torvalds, linux-kernel, Anisse Astier,
	Carlos Corbacho, Cezary Jackiewicz, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Lennart Poettering, Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo

On Mon, Mar 01, 2010 at 12:59:03PM -0500, Len Brown wrote:

> Matthew,
> Unless you object, I'll send Corentin's asus-laptop cleanup
> upstream with my treek.

I've just pulled this in (along with a couple of other minor fixes) - 
I'm just waiting to make sure I get the right set of Thinkpad fixes 
before sending another pull request.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information
  2010-03-01 18:02       ` Matthew Garrett
@ 2010-03-01 18:23         ` Len Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Len Brown @ 2010-03-01 18:23 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Corentin Chary, torvalds, linux-kernel, Anisse Astier,
	Carlos Corbacho, Cezary Jackiewicz, Daniel Oliveira Nascimento,
	Harald Welte, Henrique de Moraes Holschuh,
	Herton Ronaldo Krzesinski, Jonathan Woithe, Karol Kozimor,
	Lennart Poettering, Mattia Dongili, Peter Feuerer, Sujith Thomas,
	Thadeu Lima de Souza Cascardo



thanks,
Len Brown, Intel Open Source Technology Center

On Mon, 1 Mar 2010, Matthew Garrett wrote:

> On Mon, Mar 01, 2010 at 12:59:03PM -0500, Len Brown wrote:
> 
> > Matthew,
> > Unless you object, I'll send Corentin's asus-laptop cleanup
> > upstream with my treek.
> 
> I've just pulled this in (along with a couple of other minor fixes) - 
> I'm just waiting to make sure I get the right set of Thinkpad fixes 
> before sending another pull request.

excellent.

please pick up this one too, and I'll delete my asus branch.

thanks,
-Len


>From 6204ff7f967d68b6c3b830b6df2cf2a3081b77a8 Mon Sep 17 00:00:00 2001
From: Roel Kluin <roel.kluin@gmail.com>
Date: Tue, 2 Feb 2010 14:37:57 -0800
Subject: [PATCH] asus-acpi: remove duplicate comparison of asus_model strings
X-Patchwork-Hint: ignore

These tests already occur elsewhere

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/platform/x86/asus_acpi.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c
index c1d2aee..1381430 100644
--- a/drivers/platform/x86/asus_acpi.c
+++ b/drivers/platform/x86/asus_acpi.c
@@ -1225,9 +1225,8 @@ static int asus_model_match(char *model)
 	else if (strncmp(model, "M2N", 3) == 0 ||
 		 strncmp(model, "M3N", 3) == 0 ||
 		 strncmp(model, "M5N", 3) == 0 ||
-		 strncmp(model, "M6N", 3) == 0 ||
 		 strncmp(model, "S1N", 3) == 0 ||
-		 strncmp(model, "S5N", 3) == 0 || strncmp(model, "W1N", 3) == 0)
+		 strncmp(model, "S5N", 3) == 0)
 		return xxN;
 	else if (strncmp(model, "M1", 2) == 0)
 		return M1A;
-- 
1.7.0.87.g0901d


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH] compal-laptop: Make it depend on CONFIG_RFKILL
  2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
                   ` (15 preceding siblings ...)
  2010-02-28 19:59 ` tip: origin tree build failure Ingo Molnar
@ 2010-03-02 13:56 ` Ingo Molnar
  16 siblings, 0 replies; 34+ messages in thread
From: Ingo Molnar @ 2010-03-02 13:56 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: torvalds, linux-kernel


Hi,

* Matthew Garrett <mjg@redhat.com> wrote:

>       compal-laptop: Add support for known Compal made Dell laptops
>       compal-laptop: Replace sysfs support with rfkill support

FYI, -tip testing found a (relatively rare) build failure introduced by these 
commits, which occurs with certain .config's - see the fix below. Please 
apply.

Thanks,

	Ingo

--------------------------->
>From a6e5fbf2d4b6e9f78abcc5784f23403aa7972369 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 2 Mar 2010 14:51:16 +0100
Subject: [PATCH] compal-laptop: Make it depend on CONFIG_RFKILL

-tip testing found this build failure (x86 randconfig):

 drivers/built-in.o: In function `setup_rfkill':
 compal-laptop.c:(.text+0x36abe8): undefined reference to `rfkill_alloc'
 compal-laptop.c:(.text+0x36abfc): undefined reference to `rfkill_register'
 compal-laptop.c:(.text+0x36ac30): undefined reference to `rfkill_alloc'
 compal-laptop.c:(.text+0x36ac44): undefined reference to `rfkill_register'

Which can happen with CONFIG_COMPAL_LAPTOP=y but COMPAL_LAPTOP=m.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/platform/x86/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 89da3e2..56076ee 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -178,6 +178,7 @@ config COMPAL_LAPTOP
 	tristate "Compal Laptop Extras"
 	depends on ACPI
 	depends on BACKLIGHT_CLASS_DEVICE
+	depends on RFKILL
 	---help---
 	  This is a driver for laptops built by Compal:
 

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2010-03-02 13:56 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-26 15:18 [GIT PULL] x86 platform drivers tree Matthew Garrett
2010-02-26 15:18 ` [PATCH 01/14] MAINTAINERS: update drivers/platform/x86 information Matthew Garrett
2010-02-26 16:18   ` Thadeu Lima de Souza Cascardo
2010-02-26 16:39   ` Anisse Astier
2010-02-26 16:44     ` Anisse Astier
2010-02-26 23:58       ` Henrique de Moraes Holschuh
2010-02-26 21:53   ` Corentin Chary
2010-03-01 17:59     ` Len Brown
2010-03-01 18:02       ` Matthew Garrett
2010-03-01 18:23         ` Len Brown
2010-02-26 23:51   ` Peter Feuerer
2010-02-27  3:42   ` Jonathan Woithe
2010-02-27  4:39   ` Harald Welte
2010-02-26 15:18 ` [PATCH 02/14] compal-laptop: Add support for known Compal made Dell laptops Matthew Garrett
2010-02-26 15:18 ` [PATCH 03/14] compal-laptop: Replace sysfs support with rfkill support Matthew Garrett
2010-02-26 15:18 ` [PATCH 04/14] dell-laptop: Update rfkill state on kill switch Matthew Garrett
2010-02-27  8:06   ` Dmitry Torokhov
2010-02-26 15:18 ` [PATCH 05/14] dell-laptop: Fix platform device unregistration Matthew Garrett
2010-02-27  8:09   ` Dmitry Torokhov
2010-02-26 15:18 ` [PATCH 06/14] dell-laptop: Fix small memory leak Matthew Garrett
2010-02-26 15:18 ` [PATCH 07/14] dell-laptop: Block software state changes when rfkill hard blocked Matthew Garrett
2010-02-26 15:18 ` [PATCH 08/14] dell-laptop: Blacklist machines not supporting dell-laptop Matthew Garrett
2010-02-26 15:18 ` [PATCH 09/14] dell-laptop: Use buffer with 32-bit physical address Matthew Garrett
2010-02-27  8:11   ` Dmitry Torokhov
2010-02-26 15:18 ` [PATCH 10/14] dell-laptop: Pay attention to which devices the hardware switch controls Matthew Garrett
2010-02-26 15:18 ` [PATCH 11/14] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Matthew Garrett
2010-02-26 15:18 ` [PATCH 12/14] dell-laptop: Add another Dell laptop to the DMI whitelist Matthew Garrett
2010-02-26 15:18 ` [PATCH 13/14] hp-wmi: Add support for tablet rotation key Matthew Garrett
2010-02-27  8:12   ` Dmitry Torokhov
2010-02-26 15:18 ` [PATCH 14/14] toshiba_acpi: Add full hotkey support Matthew Garrett
2010-02-27  0:07 ` [GIT PULL] x86 platform drivers tree Henrique de Moraes Holschuh
2010-03-01 14:45   ` Matthew Garrett
2010-02-28 19:59 ` tip: origin tree build failure Ingo Molnar
2010-03-02 13:56 ` [PATCH] compal-laptop: Make it depend on CONFIG_RFKILL Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.