linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
@ 2012-01-18 19:44 Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 1/4] ACPI: EC: Add ec_get_handle() Seth Forshee
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Seth Forshee @ 2012-01-18 19:44 UTC (permalink / raw)
  To: Matthew Garrett, linux-acpi, platform-driver-x86
  Cc: Len Brown, Azael Avalos, Thomas Renninger, Seth Forshee, linux-kernel

Here's another round of the patches for expanded hotkey support for
Toshibas addressing the problems raised in the last round. Changes since
v2:

 * Use WMI GUID instead of DMI data to identify models with buggy INFO
   implementations
 * Add comment in makefile regarding link order requirement necessary
   for the above

Thanks,
Seth


Azael Avalos (1):
  toshiba_acpi: Support additional hotkey scancodes

Seth Forshee (3):
  ACPI: EC: Add ec_get_handle()
  toshiba_acpi: Support alternate hotkey interfaces
  toshiba_acpi: Refuse to load on machines with buggy INFO
    implementations

 drivers/acpi/ec.c                   |   10 ++
 drivers/platform/x86/Kconfig        |    1 +
 drivers/platform/x86/Makefile       |    4 +
 drivers/platform/x86/toshiba_acpi.c |  246 +++++++++++++++++++++++++++++-----
 include/linux/acpi.h                |    1 +
 5 files changed, 225 insertions(+), 37 deletions(-)

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

* [PATCH v3 1/4] ACPI: EC: Add ec_get_handle()
  2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
@ 2012-01-18 19:44 ` Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 2/4] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-01-18 19:44 UTC (permalink / raw)
  To: Matthew Garrett, Len Brown
  Cc: Azael Avalos, Thomas Renninger, platform-driver-x86, linux-acpi,
	Seth Forshee, linux-kernel

toshiba_acpi needs to execute an AML method within the EC namespace
to make hotkeys work on some platforms. Provide an interface to
allow it to easily get a handle to the EC namespace for this purpose.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/acpi/ec.c    |   10 ++++++++++
 include/linux/acpi.h |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index b19a18d..e37615f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -445,6 +445,16 @@ int ec_transaction(u8 command,
 
 EXPORT_SYMBOL(ec_transaction);
 
+/* Get the handle to the EC device */
+acpi_handle ec_get_handle(void)
+{
+	if (!first_ec)
+		return NULL;
+	return first_ec->handle;
+}
+
+EXPORT_SYMBOL(ec_get_handle);
+
 void acpi_ec_block_transactions(void)
 {
 	struct acpi_ec *ec = first_ec;
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6001b4da..ecccbb7 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -151,6 +151,7 @@ extern int ec_write(u8 addr, u8 val);
 extern int ec_transaction(u8 command,
                           const u8 *wdata, unsigned wdata_len,
                           u8 *rdata, unsigned rdata_len);
+extern acpi_handle ec_get_handle(void);
 
 #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
 
-- 
1.7.8.3


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

* [PATCH v3 2/4] toshiba_acpi: Support alternate hotkey interfaces
  2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 1/4] ACPI: EC: Add ec_get_handle() Seth Forshee
@ 2012-01-18 19:44 ` Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 3/4] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-01-18 19:44 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, Azael Avalos, Thomas Renninger, platform-driver-x86,
	linux-acpi, Seth Forshee, linux-kernel

There are two types of problems that prevent hotkeys from working
on many of the machines supported by toshiba_acpi. The first of
these is the lack of a functioning SCI for hotkey events. For these
machines it is possible to filter the Fn keypresses from the
keyboard and generate a notification by executing the ACPI NTFY
method.

The second problem is a lack of support for HCI_SYSTEM_EVENT, which
is used for reading the hotkey scancodes. On these machines the
scancodes can be read by executing the ACPI NTFY method.

This patch fixes both problems by installing an i8042 filter when
the NTFY method is present to generate notifications and by
detecting which of INFO or HCI_SYSTEM_EVENT is supported for
reading scancodes. If neither method of reading scancodes is
supported, the hotkey input device is not registered.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/toshiba_acpi.c |  231 +++++++++++++++++++++++++++++------
 1 files changed, 195 insertions(+), 36 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index dcdc1f4..1d83884 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -52,6 +52,8 @@
 #include <linux/input/sparse-keymap.h>
 #include <linux/leds.h>
 #include <linux/slab.h>
+#include <linux/workqueue.h>
+#include <linux/i8042.h>
 
 #include <asm/uaccess.h>
 
@@ -61,6 +63,9 @@ MODULE_AUTHOR("John Belmonte");
 MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver");
 MODULE_LICENSE("GPL");
 
+/* Scan code for Fn key on TOS1900 models */
+#define TOS1900_FN_SCAN		0x6e
+
 /* Toshiba ACPI method paths */
 #define METHOD_VIDEO_OUT	"\\_SB_.VALX.DSSX"
 
@@ -95,6 +100,8 @@ MODULE_LICENSE("GPL");
 #define HCI_WIRELESS			0x0056
 
 /* field definitions */
+#define HCI_HOTKEY_DISABLE		0x0b
+#define HCI_HOTKEY_ENABLE		0x09
 #define HCI_LCD_BRIGHTNESS_BITS		3
 #define HCI_LCD_BRIGHTNESS_SHIFT	(16-HCI_LCD_BRIGHTNESS_BITS)
 #define HCI_LCD_BRIGHTNESS_LEVELS	(1 << HCI_LCD_BRIGHTNESS_BITS)
@@ -111,6 +118,7 @@ struct toshiba_acpi_dev {
 	const char *method_hci;
 	struct rfkill *bt_rfk;
 	struct input_dev *hotkey_dev;
+	struct work_struct hotkey_work;
 	struct backlight_device *backlight_dev;
 	struct led_classdev led_dev;
 
@@ -122,10 +130,14 @@ struct toshiba_acpi_dev {
 	int video_supported:1;
 	int fan_supported:1;
 	int system_event_supported:1;
+	int ntfy_supported:1;
+	int info_supported:1;
 
 	struct mutex mutex;
 };
 
+static struct toshiba_acpi_dev *toshiba_acpi;
+
 static const struct acpi_device_id toshiba_device_ids[] = {
 	{"TOS6200", 0},
 	{"TOS6208", 0},
@@ -847,10 +859,78 @@ static const struct backlight_ops toshiba_backlight_data = {
         .update_status  = set_lcd_status,
 };
 
+static bool toshiba_acpi_i8042_filter(unsigned char data, unsigned char str,
+				      struct serio *port)
+{
+	if (str & 0x20)
+		return false;
+
+	if (unlikely(data == 0xe0))
+		return false;
+
+	if ((data & 0x7f) == TOS1900_FN_SCAN) {
+		schedule_work(&toshiba_acpi->hotkey_work);
+		return true;
+	}
+
+	return false;
+}
+
+static void toshiba_acpi_hotkey_work(struct work_struct *work)
+{
+	acpi_handle ec_handle = ec_get_handle();
+	acpi_status status;
+
+	if (!ec_handle)
+		return;
+
+	status = acpi_evaluate_object(ec_handle, "NTFY", NULL, NULL);
+	if (ACPI_FAILURE(status))
+		pr_err("ACPI NTFY method execution failed\n");
+}
+
+/*
+ * Returns hotkey scancode, or < 0 on failure.
+ */
+static int toshiba_acpi_query_hotkey(struct toshiba_acpi_dev *dev)
+{
+	struct acpi_buffer buf;
+	union acpi_object out_obj;
+	acpi_status status;
+
+	buf.pointer = &out_obj;
+	buf.length = sizeof(out_obj);
+
+	status = acpi_evaluate_object(dev->acpi_dev->handle, "INFO",
+				      NULL, &buf);
+	if (ACPI_FAILURE(status) || out_obj.type != ACPI_TYPE_INTEGER) {
+		pr_err("ACPI INFO method execution failed\n");
+		return -EIO;
+	}
+
+	return out_obj.integer.value;
+}
+
+static void toshiba_acpi_report_hotkey(struct toshiba_acpi_dev *dev,
+				       int scancode)
+{
+	if (scancode == 0x100)
+		return;
+
+	/* act on key press; ignore key release */
+	if (scancode & 0x80)
+		return;
+
+	if (!sparse_keymap_report_event(dev->hotkey_dev, scancode, 1, true))
+		pr_info("Unknown key %x\n", scancode);
+}
+
 static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 {
 	acpi_status status;
+	acpi_handle ec_handle, handle;
 	int error;
+	u32 hci_result;
 
 	dev->hotkey_dev = input_allocate_device();
 	if (!dev->hotkey_dev) {
@@ -866,21 +946,67 @@ static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 	if (error)
 		goto err_free_dev;
 
+	/*
+	 * For some machines the SCI responsible for providing hotkey
+	 * notification doesn't fire. We can trigger the notification
+	 * whenever the Fn key is pressed using the NTFY method, if
+	 * supported, so if it's present set up an i8042 key filter
+	 * for this purpose.
+	 */
+	status = AE_ERROR;
+	ec_handle = ec_get_handle();
+	if (ec_handle)
+		status = acpi_get_handle(ec_handle, "NTFY", &handle);
+
+	if (ACPI_SUCCESS(status)) {
+		INIT_WORK(&dev->hotkey_work, toshiba_acpi_hotkey_work);
+
+		error = i8042_install_filter(toshiba_acpi_i8042_filter);
+		if (error) {
+			pr_err("Error installing key filter\n");
+			goto err_free_keymap;
+		}
+
+		dev->ntfy_supported = 1;
+	}
+
+	/*
+	 * Determine hotkey query interface. Prefer using the INFO
+	 * method when it is available.
+	 */
+	status = acpi_get_handle(dev->acpi_dev->handle, "INFO", &handle);
+	if (ACPI_SUCCESS(status)) {
+		dev->info_supported = 1;
+	} else {
+		hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
+		if (hci_result == HCI_SUCCESS)
+			dev->system_event_supported = 1;
+	}
+
+	if (!dev->info_supported && !dev->system_event_supported) {
+		pr_warn("No hotkey query interface found\n");
+		goto err_remove_filter;
+	}
+
 	status = acpi_evaluate_object(dev->acpi_dev->handle, "ENAB", NULL, NULL);
 	if (ACPI_FAILURE(status)) {
 		pr_info("Unable to enable hotkeys\n");
 		error = -ENODEV;
-		goto err_free_keymap;
+		goto err_remove_filter;
 	}
 
 	error = input_register_device(dev->hotkey_dev);
 	if (error) {
 		pr_info("Unable to register input device\n");
-		goto err_free_keymap;
+		goto err_remove_filter;
 	}
 
+	hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &hci_result);
 	return 0;
 
+ err_remove_filter:
+	if (dev->ntfy_supported)
+		i8042_remove_filter(toshiba_acpi_i8042_filter);
  err_free_keymap:
 	sparse_keymap_free(dev->hotkey_dev);
  err_free_dev:
@@ -895,6 +1021,11 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
 
 	remove_toshiba_proc_entries(dev);
 
+	if (dev->ntfy_supported) {
+		i8042_remove_filter(toshiba_acpi_i8042_filter);
+		cancel_work_sync(&dev->hotkey_work);
+	}
+
 	if (dev->hotkey_dev) {
 		input_unregister_device(dev->hotkey_dev);
 		sparse_keymap_free(dev->hotkey_dev);
@@ -911,6 +1042,9 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
 	if (dev->illumination_supported)
 		led_classdev_unregister(&dev->led_dev);
 
+	if (toshiba_acpi)
+		toshiba_acpi = NULL;
+
 	kfree(dev);
 
 	return 0;
@@ -936,12 +1070,14 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 {
 	struct toshiba_acpi_dev *dev;
 	const char *hci_method;
-	u32 hci_result;
 	u32 dummy;
 	bool bt_present;
 	int ret = 0;
 	struct backlight_properties props;
 
+	if (toshiba_acpi)
+		return -EBUSY;
+
 	pr_info("Toshiba Laptop ACPI Extras version %s\n",
 	       TOSHIBA_ACPI_VERSION);
 
@@ -963,11 +1099,6 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 
 	mutex_init(&dev->mutex);
 
-	/* enable event fifo */
-	hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
-	if (hci_result == HCI_SUCCESS)
-		dev->system_event_supported = 1;
-
 	props.type = BACKLIGHT_PLATFORM;
 	props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
 	dev->backlight_dev = backlight_device_register("toshiba",
@@ -1024,6 +1155,8 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 
 	create_toshiba_proc_entries(dev);
 
+	toshiba_acpi = dev;
+
 	return 0;
 
 error:
@@ -1036,40 +1169,64 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
 	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
 	u32 hci_result, value;
 	int retries = 3;
+	int scancode;
 
-	if (!dev->system_event_supported || event != 0x80)
+	if (event != 0x80)
 		return;
 
-	do {
-		hci_read1(dev, HCI_SYSTEM_EVENT, &value, &hci_result);
-		switch (hci_result) {
-		case HCI_SUCCESS:
-			if (value == 0x100)
-				continue;
-			/* act on key press; ignore key release */
-			if (value & 0x80)
-				continue;
-
-			if (!sparse_keymap_report_event(dev->hotkey_dev,
-							value, 1, true)) {
-				pr_info("Unknown key %x\n",
-				       value);
+	if (dev->info_supported) {
+		scancode = toshiba_acpi_query_hotkey(dev);
+		if (scancode < 0)
+			pr_err("Failed to query hotkey event\n");
+		else if (scancode != 0)
+			toshiba_acpi_report_hotkey(dev, scancode);
+	} else if (dev->system_event_supported) {
+		do {
+			hci_read1(dev, HCI_SYSTEM_EVENT, &value, &hci_result);
+			switch (hci_result) {
+			case HCI_SUCCESS:
+				toshiba_acpi_report_hotkey(dev, (int)value);
+				break;
+			case HCI_NOT_SUPPORTED:
+				/*
+				 * This is a workaround for an unresolved
+				 * issue on some machines where system events
+				 * sporadically become disabled.
+				 */
+				hci_write1(dev, HCI_SYSTEM_EVENT, 1,
+					   &hci_result);
+				pr_notice("Re-enabled hotkeys\n");
+				/* fall through */
+			default:
+				retries--;
+				break;
 			}
-			break;
-		case HCI_NOT_SUPPORTED:
-			/* This is a workaround for an unresolved issue on
-			 * some machines where system events sporadically
-			 * become disabled. */
-			hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
-			pr_notice("Re-enabled hotkeys\n");
-			/* fall through */
-		default:
-			retries--;
-			break;
-		}
-	} while (retries && hci_result != HCI_EMPTY);
+		} while (retries && hci_result != HCI_EMPTY);
+	}
 }
 
+static int toshiba_acpi_suspend(struct acpi_device *acpi_dev,
+				pm_message_t state)
+{
+	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
+	u32 result;
+
+	if (dev->hotkey_dev)
+		hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_DISABLE, &result);
+
+	return 0;
+}
+
+static int toshiba_acpi_resume(struct acpi_device *acpi_dev)
+{
+	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
+	u32 result;
+
+	if (dev->hotkey_dev)
+		hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &result);
+
+	return 0;
+}
 
 static struct acpi_driver toshiba_acpi_driver = {
 	.name	= "Toshiba ACPI driver",
@@ -1080,6 +1237,8 @@ static struct acpi_driver toshiba_acpi_driver = {
 		.add		= toshiba_acpi_add,
 		.remove		= toshiba_acpi_remove,
 		.notify		= toshiba_acpi_notify,
+		.suspend	= toshiba_acpi_suspend,
+		.resume		= toshiba_acpi_resume,
 	},
 };
 
-- 
1.7.8.3


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

* [PATCH v3 3/4] toshiba_acpi: Support additional hotkey scancodes
  2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 1/4] ACPI: EC: Add ec_get_handle() Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 2/4] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
@ 2012-01-18 19:44 ` Seth Forshee
  2012-01-18 19:44 ` [PATCH v3 4/4] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
  2012-02-06 15:06 ` [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-01-18 19:44 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, Azael Avalos, Thomas Renninger, platform-driver-x86,
	linux-acpi, Seth Forshee, linux-kernel

From: Azael Avalos <coproscefalo@gmail.com>

These scancodes are used by many of the models now supported with
the addition of TOS1900 device support.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/toshiba_acpi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 1d83884..6824bf7 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -150,6 +150,8 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0x101, { KEY_MUTE } },
 	{ KE_KEY, 0x102, { KEY_ZOOMOUT } },
 	{ KE_KEY, 0x103, { KEY_ZOOMIN } },
+	{ KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
+	{ KE_KEY, 0x139, { KEY_ZOOMRESET } },
 	{ KE_KEY, 0x13b, { KEY_COFFEE } },
 	{ KE_KEY, 0x13c, { KEY_BATTERY } },
 	{ KE_KEY, 0x13d, { KEY_SLEEP } },
@@ -158,7 +160,7 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
 	{ KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
 	{ KE_KEY, 0x142, { KEY_WLAN } },
-	{ KE_KEY, 0x143, { KEY_PROG1 } },
+	{ KE_KEY, 0x143, { KEY_TOUCHPAD_TOGGLE } },
 	{ KE_KEY, 0x17f, { KEY_FN } },
 	{ KE_KEY, 0xb05, { KEY_PROG2 } },
 	{ KE_KEY, 0xb06, { KEY_WWW } },
@@ -168,6 +170,7 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0xb32, { KEY_NEXTSONG } },
 	{ KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
 	{ KE_KEY, 0xb5a, { KEY_MEDIA } },
+	{ KE_IGNORE, 0x1430, { KEY_RESERVED } },
 	{ KE_END, 0 },
 };
 
-- 
1.7.8.3


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

* [PATCH v3 4/4] toshiba_acpi: Refuse to load on machines with buggy INFO implementations
  2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
                   ` (2 preceding siblings ...)
  2012-01-18 19:44 ` [PATCH v3 3/4] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
@ 2012-01-18 19:44 ` Seth Forshee
  2012-02-06 15:06 ` [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-01-18 19:44 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, Azael Avalos, Thomas Renninger, platform-driver-x86,
	linux-acpi, Seth Forshee, linux-kernel

Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:

 ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 toshiba_acpi: ACPI INFO method execution failed
 toshiba_acpi: Failed to query hotkey event

All known machines with this implementation also have a WMI interface
with event GUID 59142400-C6A3-40FA-BADB-8A2652834100 which is not seen
on any other models. Refuse to load toshiba_acpi on machines with this
guid.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/Kconfig        |    1 +
 drivers/platform/x86/Makefile       |    4 ++++
 drivers/platform/x86/toshiba_acpi.c |   10 ++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 7f43cf8..294e496 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -580,6 +580,7 @@ config TOPSTAR_LAPTOP
 config ACPI_TOSHIBA
 	tristate "Toshiba Laptop Extras"
 	depends on ACPI
+	depends on ACPI_WMI
 	select LEDS_CLASS
 	select NEW_LEDS
 	depends on BACKLIGHT_CLASS_DEVICE
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 293a320..95ce3a1 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -29,7 +29,11 @@ obj-$(CONFIG_ACPI_WMI)		+= wmi.o
 obj-$(CONFIG_MSI_WMI)		+= msi-wmi.o
 obj-$(CONFIG_ACPI_ASUS)		+= asus_acpi.o
 obj-$(CONFIG_TOPSTAR_LAPTOP)	+= topstar-laptop.o
+
+# toshiba_acpi must link after wmi to ensure that wmi devices are found
+# before toshiba_acpi initializes
 obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
+
 obj-$(CONFIG_TOSHIBA_BT_RFKILL)	+= toshiba_bluetooth.o
 obj-$(CONFIG_INTEL_SCU_IPC)	+= intel_scu_ipc.o
 obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 6824bf7..eef3b53 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -63,6 +63,8 @@ MODULE_AUTHOR("John Belmonte");
 MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver");
 MODULE_LICENSE("GPL");
 
+#define TOSHIBA_WMI_EVENT_GUID "59142400-C6A3-40FA-BADB-8A2652834100"
+
 /* Scan code for Fn key on TOS1900 models */
 #define TOS1900_FN_SCAN		0x6e
 
@@ -1249,6 +1251,14 @@ static int __init toshiba_acpi_init(void)
 {
 	int ret;
 
+	/*
+	 * Machines with this WMI guid aren't supported due to bugs in
+	 * their AML. This check relies on wmi initializing before
+	 * toshiba_acpi to guarantee guids have been identified.
+	 */
+	if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID))
+		return -ENODEV;
+
 	toshiba_proc_dir = proc_mkdir(PROC_TOSHIBA, acpi_root_dir);
 	if (!toshiba_proc_dir) {
 		pr_err("Unable to create proc dir " PROC_TOSHIBA "\n");
-- 
1.7.8.3


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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
                   ` (3 preceding siblings ...)
  2012-01-18 19:44 ` [PATCH v3 4/4] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
@ 2012-02-06 15:06 ` Seth Forshee
  2012-02-06 15:15   ` Matthew Garrett
  4 siblings, 1 reply; 22+ messages in thread
From: Seth Forshee @ 2012-02-06 15:06 UTC (permalink / raw)
  To: Matthew Garrett, linux-acpi, platform-driver-x86
  Cc: Len Brown, Azael Avalos, Thomas Renninger, linux-kernel

On Wed, Jan 18, 2012 at 01:44:07PM -0600, Seth Forshee wrote:
> Here's another round of the patches for expanded hotkey support for
> Toshibas addressing the problems raised in the last round. Changes since
> v2:
> 
>  * Use WMI GUID instead of DMI data to identify models with buggy INFO
>    implementations
>  * Add comment in makefile regarding link order requirement necessary
>    for the above

Matthew: Just wondering if there are more issues that need to be
addressed with this round of patches, or if they're looking okay at this
point.

Seth

> 
> Thanks,
> Seth
> 
> 
> Azael Avalos (1):
>   toshiba_acpi: Support additional hotkey scancodes
> 
> Seth Forshee (3):
>   ACPI: EC: Add ec_get_handle()
>   toshiba_acpi: Support alternate hotkey interfaces
>   toshiba_acpi: Refuse to load on machines with buggy INFO
>     implementations
> 
>  drivers/acpi/ec.c                   |   10 ++
>  drivers/platform/x86/Kconfig        |    1 +
>  drivers/platform/x86/Makefile       |    4 +
>  drivers/platform/x86/toshiba_acpi.c |  246 +++++++++++++++++++++++++++++-----
>  include/linux/acpi.h                |    1 +
>  5 files changed, 225 insertions(+), 37 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-02-06 15:06 ` [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
@ 2012-02-06 15:15   ` Matthew Garrett
  2012-02-10 16:56     ` Seth Forshee
  2012-03-05 22:04     ` Seth Forshee
  0 siblings, 2 replies; 22+ messages in thread
From: Matthew Garrett @ 2012-02-06 15:15 UTC (permalink / raw)
  To: linux-acpi, platform-driver-x86, Len Brown, Azael Avalos,
	Thomas Renninger, linux-kernel

On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:

> Matthew: Just wondering if there are more issues that need to be
> addressed with this round of patches, or if they're looking okay at this
> point.

I'm fine with them at this point, just waiting on Len to give feedback 
on the ACPI patch.

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

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-02-06 15:15   ` Matthew Garrett
@ 2012-02-10 16:56     ` Seth Forshee
  2012-02-22 21:43       ` Seth Forshee
  2012-03-05 22:04     ` Seth Forshee
  1 sibling, 1 reply; 22+ messages in thread
From: Seth Forshee @ 2012-02-10 16:56 UTC (permalink / raw)
  To: Len Brown
  Cc: Matthew Garrett, linux-acpi, platform-driver-x86, Azael Avalos,
	Thomas Renninger, linux-kernel

On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
> 
> > Matthew: Just wondering if there are more issues that need to be
> > addressed with this round of patches, or if they're looking okay at this
> > point.
> 
> I'm fine with them at this point, just waiting on Len to give feedback 
> on the ACPI patch.

Len,

Do you have any objection to the patch [1]?

Thanks,
Seth

[1] https://lkml.org/lkml/2012/1/18/333

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-02-10 16:56     ` Seth Forshee
@ 2012-02-22 21:43       ` Seth Forshee
  0 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-02-22 21:43 UTC (permalink / raw)
  To: Len Brown
  Cc: Matthew Garrett, linux-acpi, platform-driver-x86, Azael Avalos,
	Thomas Renninger, linux-kernel

On Fri, Feb 10, 2012 at 10:56:46AM -0600, Seth Forshee wrote:
> On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
> > On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
> > 
> > > Matthew: Just wondering if there are more issues that need to be
> > > addressed with this round of patches, or if they're looking okay at this
> > > point.
> > 
> > I'm fine with them at this point, just waiting on Len to give feedback 
> > on the ACPI patch.
> 
> Len,
> 
> Do you have any objection to the patch [1]?
> 
> Thanks,
> Seth
> 
> [1] https://lkml.org/lkml/2012/1/18/333

Ping. This is a pretty trivial patch, so I'd really appreicate it if you
could take a couple of minutes to give feedback. It would be really nice
to be able to get some action on these patches in time for 3.4.

Thanks,
Seth

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-02-06 15:15   ` Matthew Garrett
  2012-02-10 16:56     ` Seth Forshee
@ 2012-03-05 22:04     ` Seth Forshee
  2012-03-05 23:01       ` Randy Dunlap
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
  1 sibling, 2 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-05 22:04 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: linux-acpi, platform-driver-x86, Len Brown, Azael Avalos,
	Thomas Renninger, linux-kernel

On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
> 
> > Matthew: Just wondering if there are more issues that need to be
> > addressed with this round of patches, or if they're looking okay at this
> > point.
> 
> I'm fine with them at this point, just waiting on Len to give feedback 
> on the ACPI patch.

Well, I've been trying to get some comment on the ACPI patch, to no
avail. Unless there's some other option, I guess I'll just resend the
patches using an alternative method for getting the EC handle.

Seth

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-03-05 22:04     ` Seth Forshee
@ 2012-03-05 23:01       ` Randy Dunlap
  2012-03-05 23:34         ` Seth Forshee
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
  1 sibling, 1 reply; 22+ messages in thread
From: Randy Dunlap @ 2012-03-05 23:01 UTC (permalink / raw)
  To: Matthew Garrett, linux-acpi, platform-driver-x86, Len Brown,
	Azael Avalos, Thomas Renninger, linux-kernel

On 03/05/2012 02:04 PM, Seth Forshee wrote:

> On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
>> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
>>
>>> Matthew: Just wondering if there are more issues that need to be
>>> addressed with this round of patches, or if they're looking okay at this
>>> point.
>>
>> I'm fine with them at this point, just waiting on Len to give feedback 
>> on the ACPI patch.
> 
> Well, I've been trying to get some comment on the ACPI patch, to no
> avail. Unless there's some other option, I guess I'll just resend the
> patches using an alternative method for getting the EC handle.


I did test this patch series on 3.3-rc5 to see if it would
help with the touchpad on/off key on my Toshiba Portege.

The patch series didn't have any ill effects, nor did it help
with the touchpad on/off key.  :(

-- 
~Randy

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-03-05 23:01       ` Randy Dunlap
@ 2012-03-05 23:34         ` Seth Forshee
  2012-03-06  0:55           ` Randy Dunlap
  0 siblings, 1 reply; 22+ messages in thread
From: Seth Forshee @ 2012-03-05 23:34 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Matthew Garrett, linux-acpi, platform-driver-x86, Len Brown,
	Azael Avalos, Thomas Renninger, linux-kernel

On Mon, Mar 05, 2012 at 03:01:15PM -0800, Randy Dunlap wrote:
> On 03/05/2012 02:04 PM, Seth Forshee wrote:
> 
> > On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
> >> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
> >>
> >>> Matthew: Just wondering if there are more issues that need to be
> >>> addressed with this round of patches, or if they're looking okay at this
> >>> point.
> >>
> >> I'm fine with them at this point, just waiting on Len to give feedback 
> >> on the ACPI patch.
> > 
> > Well, I've been trying to get some comment on the ACPI patch, to no
> > avail. Unless there's some other option, I guess I'll just resend the
> > patches using an alternative method for getting the EC handle.
> 
> 
> I did test this patch series on 3.3-rc5 to see if it would
> help with the touchpad on/off key on my Toshiba Portege.
> 
> The patch series didn't have any ill effects, nor did it help
> with the touchpad on/off key.  :(

Is it only that hotkey that doesn't work, or do the others fail to work
as well?

If it's only that key that doesn't work, I'd suggest using input-events
to determine exactly which device the other hotkey events are coming
from (it might be more than one) and to verify there really isn't any
event coming out for that key. If there's no event at all for the key,
check dmesg and see if any messages are printed there when you press the
touchpad key.

Seth


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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-03-05 23:34         ` Seth Forshee
@ 2012-03-06  0:55           ` Randy Dunlap
  2012-03-06  3:20             ` Seth Forshee
  0 siblings, 1 reply; 22+ messages in thread
From: Randy Dunlap @ 2012-03-06  0:55 UTC (permalink / raw)
  To: Matthew Garrett, linux-acpi, platform-driver-x86, Len Brown,
	Azael Avalos, Thomas Renninger, linux-kernel

On 03/05/2012 03:34 PM, Seth Forshee wrote:

> On Mon, Mar 05, 2012 at 03:01:15PM -0800, Randy Dunlap wrote:
>> On 03/05/2012 02:04 PM, Seth Forshee wrote:
>>
>>> On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
>>>> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
>>>>
>>>>> Matthew: Just wondering if there are more issues that need to be
>>>>> addressed with this round of patches, or if they're looking okay at this
>>>>> point.
>>>>
>>>> I'm fine with them at this point, just waiting on Len to give feedback 
>>>> on the ACPI patch.
>>>
>>> Well, I've been trying to get some comment on the ACPI patch, to no
>>> avail. Unless there's some other option, I guess I'll just resend the
>>> patches using an alternative method for getting the EC handle.
>>
>>
>> I did test this patch series on 3.3-rc5 to see if it would
>> help with the touchpad on/off key on my Toshiba Portege.
>>
>> The patch series didn't have any ill effects, nor did it help
>> with the touchpad on/off key.  :(
> 
> Is it only that hotkey that doesn't work, or do the others fail to work
> as well?

I haven't tried any others.  Which ones do you suggest that I test?

> If it's only that key that doesn't work, I'd suggest using input-events
> to determine exactly which device the other hotkey events are coming
> from (it might be more than one) and to verify there really isn't any
> event coming out for that key. If there's no event at all for the key,
> check dmesg and see if any messages are printed there when you press the
> touchpad key.


I don't know about "input-events".  Where do I find it & info on it?

I already tried using 'showkey' and it didn't see any keypress for the
touchpad key.

thanks,
-- 
~Randy

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

* Re: [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support
  2012-03-06  0:55           ` Randy Dunlap
@ 2012-03-06  3:20             ` Seth Forshee
  0 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-06  3:20 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Matthew Garrett, linux-acpi, platform-driver-x86, Len Brown,
	Azael Avalos, Thomas Renninger, linux-kernel

On Mon, Mar 05, 2012 at 04:55:46PM -0800, Randy Dunlap wrote:
> On 03/05/2012 03:34 PM, Seth Forshee wrote:
> 
> > On Mon, Mar 05, 2012 at 03:01:15PM -0800, Randy Dunlap wrote:
> >> On 03/05/2012 02:04 PM, Seth Forshee wrote:
> >>
> >>> On Mon, Feb 06, 2012 at 03:15:48PM +0000, Matthew Garrett wrote:
> >>>> On Mon, Feb 06, 2012 at 09:06:58AM -0600, Seth Forshee wrote:
> >>>>
> >>>>> Matthew: Just wondering if there are more issues that need to be
> >>>>> addressed with this round of patches, or if they're looking okay at this
> >>>>> point.
> >>>>
> >>>> I'm fine with them at this point, just waiting on Len to give feedback 
> >>>> on the ACPI patch.
> >>>
> >>> Well, I've been trying to get some comment on the ACPI patch, to no
> >>> avail. Unless there's some other option, I guess I'll just resend the
> >>> patches using an alternative method for getting the EC handle.
> >>
> >>
> >> I did test this patch series on 3.3-rc5 to see if it would
> >> help with the touchpad on/off key on my Toshiba Portege.
> >>
> >> The patch series didn't have any ill effects, nor did it help
> >> with the touchpad on/off key.  :(
> > 
> > Is it only that hotkey that doesn't work, or do the others fail to work
> > as well?
> 
> I haven't tried any others.  Which ones do you suggest that I test?

Without knowing what buttons you have I'll just throw out some
suggestions. Wifi, sleep/hibernate, battery status, brightness up/down,
and various zoom buttons are some of the ones that I see on the NB505.

> > If it's only that key that doesn't work, I'd suggest using input-events
> > to determine exactly which device the other hotkey events are coming
> > from (it might be more than one) and to verify there really isn't any
> > event coming out for that key. If there's no event at all for the key,
> > check dmesg and see if any messages are printed there when you press the
> > touchpad key.
> 
> 
> I don't know about "input-events".  Where do I find it & info on it?

On Debian/Ubuntu it's in the input-utils package, I don't know about
other distros. Source is at http://www.kraxel.org/cgit/input/.

Basic instructions are to use lsinput to identify the device you want to
test, then pass the event device number as the argument to input-utils,
which will dump the raw events that come out for only that device. Your
hotkeys should come out of either the device named "Toshiba input
device" or "AT Translated Set 2 Keyboard", or some on both.

> I already tried using 'showkey' and it didn't see any keypress for the
> touchpad key.

Have you tried it with the -s argument to see if a scancode is produced?
Both the Toshiba and AT keyboard input devices should leave a message in
dmesg though if they see an unknown scancode though.

Seth


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

* [PATCH v4 0/3] Expanded hotkey support
  2012-03-05 22:04     ` Seth Forshee
  2012-03-05 23:01       ` Randy Dunlap
@ 2012-03-06  3:30       ` Seth Forshee
  2012-03-06  3:30         ` [PATCH v4 1/3] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
                           ` (4 more replies)
  1 sibling, 5 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-06  3:30 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: Azael Avalos, Thomas Renninger, linux-kernel, Seth Forshee

New version of the patches which remove the need to modify the EC
driver.

Changes since v3:

 * Drop patch to add ec_get_handle()
 * Use acpi_get_devices() to get EC handle

Thanks,
Seth


Azael Avalos (1):
  toshiba_acpi: Support additional hotkey scancodes

Seth Forshee (2):
  toshiba_acpi: Support alternate hotkey interfaces
  toshiba_acpi: Refuse to load on machines with buggy INFO
    implementations

 drivers/platform/x86/Kconfig        |    1 +
 drivers/platform/x86/Makefile       |    4 +
 drivers/platform/x86/toshiba_acpi.c |  260 ++++++++++++++++++++++++++++++-----
 3 files changed, 228 insertions(+), 37 deletions(-)


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

* [PATCH v4 1/3] toshiba_acpi: Support alternate hotkey interfaces
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
@ 2012-03-06  3:30         ` Seth Forshee
  2012-03-06  3:30         ` [PATCH 2/3] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-06  3:30 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: Azael Avalos, Thomas Renninger, linux-kernel, Seth Forshee

There are two types of problems that prevent hotkeys from working
on many of the machines supported by toshiba_acpi. The first of
these is the lack of a functioning SCI for hotkey events. For these
machines it is possible to filter the Fn keypresses from the
keyboard and generate a notification by executing the ACPI NTFY
method.

The second problem is a lack of support for HCI_SYSTEM_EVENT, which
is used for reading the hotkey scancodes. On these machines the
scancodes can be read by executing the ACPI NTFY method.

This patch fixes both problems by installing an i8042 filter when
the NTFY method is present to generate notifications and by
detecting which of INFO or HCI_SYSTEM_EVENT is supported for
reading scancodes. If neither method of reading scancodes is
supported, the hotkey input device is not registered.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/toshiba_acpi.c |  245 +++++++++++++++++++++++++++++-----
 1 files changed, 209 insertions(+), 36 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index dcdc1f4..f49330a 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -52,6 +52,8 @@
 #include <linux/input/sparse-keymap.h>
 #include <linux/leds.h>
 #include <linux/slab.h>
+#include <linux/workqueue.h>
+#include <linux/i8042.h>
 
 #include <asm/uaccess.h>
 
@@ -61,6 +63,9 @@ MODULE_AUTHOR("John Belmonte");
 MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver");
 MODULE_LICENSE("GPL");
 
+/* Scan code for Fn key on TOS1900 models */
+#define TOS1900_FN_SCAN		0x6e
+
 /* Toshiba ACPI method paths */
 #define METHOD_VIDEO_OUT	"\\_SB_.VALX.DSSX"
 
@@ -95,6 +100,8 @@ MODULE_LICENSE("GPL");
 #define HCI_WIRELESS			0x0056
 
 /* field definitions */
+#define HCI_HOTKEY_DISABLE		0x0b
+#define HCI_HOTKEY_ENABLE		0x09
 #define HCI_LCD_BRIGHTNESS_BITS		3
 #define HCI_LCD_BRIGHTNESS_SHIFT	(16-HCI_LCD_BRIGHTNESS_BITS)
 #define HCI_LCD_BRIGHTNESS_LEVELS	(1 << HCI_LCD_BRIGHTNESS_BITS)
@@ -109,8 +116,11 @@ MODULE_LICENSE("GPL");
 struct toshiba_acpi_dev {
 	struct acpi_device *acpi_dev;
 	const char *method_hci;
+	acpi_handle ec_handle;
+
 	struct rfkill *bt_rfk;
 	struct input_dev *hotkey_dev;
+	struct work_struct hotkey_work;
 	struct backlight_device *backlight_dev;
 	struct led_classdev led_dev;
 
@@ -122,10 +132,14 @@ struct toshiba_acpi_dev {
 	int video_supported:1;
 	int fan_supported:1;
 	int system_event_supported:1;
+	int ntfy_supported:1;
+	int info_supported:1;
 
 	struct mutex mutex;
 };
 
+static struct toshiba_acpi_dev *toshiba_acpi;
+
 static const struct acpi_device_id toshiba_device_ids[] = {
 	{"TOS6200", 0},
 	{"TOS6208", 0},
@@ -847,10 +861,86 @@ static const struct backlight_ops toshiba_backlight_data = {
         .update_status  = set_lcd_status,
 };
 
+static bool toshiba_acpi_i8042_filter(unsigned char data, unsigned char str,
+				      struct serio *port)
+{
+	if (str & 0x20)
+		return false;
+
+	if (unlikely(data == 0xe0))
+		return false;
+
+	if ((data & 0x7f) == TOS1900_FN_SCAN) {
+		schedule_work(&toshiba_acpi->hotkey_work);
+		return true;
+	}
+
+	return false;
+}
+
+static void toshiba_acpi_hotkey_work(struct work_struct *work)
+{
+	struct toshiba_acpi_dev *dev = container_of(work,
+			struct toshiba_acpi_dev, hotkey_work);
+	acpi_status status;
+
+	if (!dev->ec_handle)
+		return;
+
+	status = acpi_evaluate_object(dev->ec_handle, "NTFY", NULL, NULL);
+	if (ACPI_FAILURE(status))
+		pr_err("ACPI NTFY method execution failed\n");
+}
+
+/*
+ * Returns hotkey scancode, or < 0 on failure.
+ */
+static int toshiba_acpi_query_hotkey(struct toshiba_acpi_dev *dev)
+{
+	struct acpi_buffer buf;
+	union acpi_object out_obj;
+	acpi_status status;
+
+	buf.pointer = &out_obj;
+	buf.length = sizeof(out_obj);
+
+	status = acpi_evaluate_object(dev->acpi_dev->handle, "INFO",
+				      NULL, &buf);
+	if (ACPI_FAILURE(status) || out_obj.type != ACPI_TYPE_INTEGER) {
+		pr_err("ACPI INFO method execution failed\n");
+		return -EIO;
+	}
+
+	return out_obj.integer.value;
+}
+
+static void toshiba_acpi_report_hotkey(struct toshiba_acpi_dev *dev,
+				       int scancode)
+{
+	if (scancode == 0x100)
+		return;
+
+	/* act on key press; ignore key release */
+	if (scancode & 0x80)
+		return;
+
+	if (!sparse_keymap_report_event(dev->hotkey_dev, scancode, 1, true))
+		pr_info("Unknown key %x\n", scancode);
+}
+
+static acpi_status __devinit toshiba_acpi_get_ec_callback(acpi_handle handle,
+				u32 level, void *context, void **return_value)
+{
+	*(acpi_handle *)return_value = handle;
+	return AE_CTRL_TERMINATE;
+}
+
 static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 {
 	acpi_status status;
+	acpi_handle handle;
 	int error;
+	u32 hci_result;
 
 	dev->hotkey_dev = input_allocate_device();
 	if (!dev->hotkey_dev) {
@@ -866,21 +956,71 @@ static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 	if (error)
 		goto err_free_dev;
 
+	/*
+	 * For some machines the SCI responsible for providing hotkey
+	 * notification doesn't fire. We can trigger the notification
+	 * whenever the Fn key is pressed using the NTFY method, if
+	 * supported, so if it's present set up an i8042 key filter
+	 * for this purpose.
+	 */
+	status = acpi_get_devices("PNP0C09", toshiba_acpi_get_ec_callback,
+				  NULL, &dev->ec_handle);
+	if (ACPI_SUCCESS(status) && dev->ec_handle) {
+		status = acpi_get_handle(dev->ec_handle, "NTFY", &handle);
+	} else {
+		pr_warn("no EC found, hotkeys may not function\n");
+		status = AE_ERROR;
+	}
+
+	if (ACPI_SUCCESS(status)) {
+		INIT_WORK(&dev->hotkey_work, toshiba_acpi_hotkey_work);
+
+		error = i8042_install_filter(toshiba_acpi_i8042_filter);
+		if (error) {
+			pr_err("Error installing key filter\n");
+			goto err_free_keymap;
+		}
+
+		dev->ntfy_supported = 1;
+	}
+
+	/*
+	 * Determine hotkey query interface. Prefer using the INFO
+	 * method when it is available.
+	 */
+	status = acpi_get_handle(dev->acpi_dev->handle, "INFO", &handle);
+	if (ACPI_SUCCESS(status)) {
+		dev->info_supported = 1;
+	} else {
+		hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
+		if (hci_result == HCI_SUCCESS)
+			dev->system_event_supported = 1;
+	}
+
+	if (!dev->info_supported && !dev->system_event_supported) {
+		pr_warn("No hotkey query interface found\n");
+		goto err_remove_filter;
+	}
+
 	status = acpi_evaluate_object(dev->acpi_dev->handle, "ENAB", NULL, NULL);
 	if (ACPI_FAILURE(status)) {
 		pr_info("Unable to enable hotkeys\n");
 		error = -ENODEV;
-		goto err_free_keymap;
+		goto err_remove_filter;
 	}
 
 	error = input_register_device(dev->hotkey_dev);
 	if (error) {
 		pr_info("Unable to register input device\n");
-		goto err_free_keymap;
+		goto err_remove_filter;
 	}
 
+	hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &hci_result);
 	return 0;
 
+ err_remove_filter:
+	if (dev->ntfy_supported)
+		i8042_remove_filter(toshiba_acpi_i8042_filter);
  err_free_keymap:
 	sparse_keymap_free(dev->hotkey_dev);
  err_free_dev:
@@ -895,6 +1035,11 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
 
 	remove_toshiba_proc_entries(dev);
 
+	if (dev->ntfy_supported) {
+		i8042_remove_filter(toshiba_acpi_i8042_filter);
+		cancel_work_sync(&dev->hotkey_work);
+	}
+
 	if (dev->hotkey_dev) {
 		input_unregister_device(dev->hotkey_dev);
 		sparse_keymap_free(dev->hotkey_dev);
@@ -911,6 +1056,9 @@ static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
 	if (dev->illumination_supported)
 		led_classdev_unregister(&dev->led_dev);
 
+	if (toshiba_acpi)
+		toshiba_acpi = NULL;
+
 	kfree(dev);
 
 	return 0;
@@ -936,12 +1084,14 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 {
 	struct toshiba_acpi_dev *dev;
 	const char *hci_method;
-	u32 hci_result;
 	u32 dummy;
 	bool bt_present;
 	int ret = 0;
 	struct backlight_properties props;
 
+	if (toshiba_acpi)
+		return -EBUSY;
+
 	pr_info("Toshiba Laptop ACPI Extras version %s\n",
 	       TOSHIBA_ACPI_VERSION);
 
@@ -963,11 +1113,6 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 
 	mutex_init(&dev->mutex);
 
-	/* enable event fifo */
-	hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
-	if (hci_result == HCI_SUCCESS)
-		dev->system_event_supported = 1;
-
 	props.type = BACKLIGHT_PLATFORM;
 	props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
 	dev->backlight_dev = backlight_device_register("toshiba",
@@ -1024,6 +1169,8 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 
 	create_toshiba_proc_entries(dev);
 
+	toshiba_acpi = dev;
+
 	return 0;
 
 error:
@@ -1036,40 +1183,64 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
 	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
 	u32 hci_result, value;
 	int retries = 3;
+	int scancode;
 
-	if (!dev->system_event_supported || event != 0x80)
+	if (event != 0x80)
 		return;
 
-	do {
-		hci_read1(dev, HCI_SYSTEM_EVENT, &value, &hci_result);
-		switch (hci_result) {
-		case HCI_SUCCESS:
-			if (value == 0x100)
-				continue;
-			/* act on key press; ignore key release */
-			if (value & 0x80)
-				continue;
-
-			if (!sparse_keymap_report_event(dev->hotkey_dev,
-							value, 1, true)) {
-				pr_info("Unknown key %x\n",
-				       value);
+	if (dev->info_supported) {
+		scancode = toshiba_acpi_query_hotkey(dev);
+		if (scancode < 0)
+			pr_err("Failed to query hotkey event\n");
+		else if (scancode != 0)
+			toshiba_acpi_report_hotkey(dev, scancode);
+	} else if (dev->system_event_supported) {
+		do {
+			hci_read1(dev, HCI_SYSTEM_EVENT, &value, &hci_result);
+			switch (hci_result) {
+			case HCI_SUCCESS:
+				toshiba_acpi_report_hotkey(dev, (int)value);
+				break;
+			case HCI_NOT_SUPPORTED:
+				/*
+				 * This is a workaround for an unresolved
+				 * issue on some machines where system events
+				 * sporadically become disabled.
+				 */
+				hci_write1(dev, HCI_SYSTEM_EVENT, 1,
+					   &hci_result);
+				pr_notice("Re-enabled hotkeys\n");
+				/* fall through */
+			default:
+				retries--;
+				break;
 			}
-			break;
-		case HCI_NOT_SUPPORTED:
-			/* This is a workaround for an unresolved issue on
-			 * some machines where system events sporadically
-			 * become disabled. */
-			hci_write1(dev, HCI_SYSTEM_EVENT, 1, &hci_result);
-			pr_notice("Re-enabled hotkeys\n");
-			/* fall through */
-		default:
-			retries--;
-			break;
-		}
-	} while (retries && hci_result != HCI_EMPTY);
+		} while (retries && hci_result != HCI_EMPTY);
+	}
 }
 
+static int toshiba_acpi_suspend(struct acpi_device *acpi_dev,
+				pm_message_t state)
+{
+	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
+	u32 result;
+
+	if (dev->hotkey_dev)
+		hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_DISABLE, &result);
+
+	return 0;
+}
+
+static int toshiba_acpi_resume(struct acpi_device *acpi_dev)
+{
+	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
+	u32 result;
+
+	if (dev->hotkey_dev)
+		hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &result);
+
+	return 0;
+}
 
 static struct acpi_driver toshiba_acpi_driver = {
 	.name	= "Toshiba ACPI driver",
@@ -1080,6 +1251,8 @@ static struct acpi_driver toshiba_acpi_driver = {
 		.add		= toshiba_acpi_add,
 		.remove		= toshiba_acpi_remove,
 		.notify		= toshiba_acpi_notify,
+		.suspend	= toshiba_acpi_suspend,
+		.resume		= toshiba_acpi_resume,
 	},
 };
 
-- 
1.7.9


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

* [PATCH 2/3] toshiba_acpi: Support additional hotkey scancodes
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
  2012-03-06  3:30         ` [PATCH v4 1/3] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
@ 2012-03-06  3:30         ` Seth Forshee
  2012-03-06  3:30         ` [PATCH 3/3] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-06  3:30 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: Azael Avalos, Thomas Renninger, linux-kernel, Seth Forshee

From: Azael Avalos <coproscefalo@gmail.com>

These scancodes are used by many of the models now supported with
the addition of TOS1900 device support.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/toshiba_acpi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index f49330a..621b207 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -152,6 +152,8 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0x101, { KEY_MUTE } },
 	{ KE_KEY, 0x102, { KEY_ZOOMOUT } },
 	{ KE_KEY, 0x103, { KEY_ZOOMIN } },
+	{ KE_KEY, 0x12c, { KEY_KBDILLUMTOGGLE } },
+	{ KE_KEY, 0x139, { KEY_ZOOMRESET } },
 	{ KE_KEY, 0x13b, { KEY_COFFEE } },
 	{ KE_KEY, 0x13c, { KEY_BATTERY } },
 	{ KE_KEY, 0x13d, { KEY_SLEEP } },
@@ -160,7 +162,7 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0x140, { KEY_BRIGHTNESSDOWN } },
 	{ KE_KEY, 0x141, { KEY_BRIGHTNESSUP } },
 	{ KE_KEY, 0x142, { KEY_WLAN } },
-	{ KE_KEY, 0x143, { KEY_PROG1 } },
+	{ KE_KEY, 0x143, { KEY_TOUCHPAD_TOGGLE } },
 	{ KE_KEY, 0x17f, { KEY_FN } },
 	{ KE_KEY, 0xb05, { KEY_PROG2 } },
 	{ KE_KEY, 0xb06, { KEY_WWW } },
@@ -170,6 +172,7 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_KEY, 0xb32, { KEY_NEXTSONG } },
 	{ KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
 	{ KE_KEY, 0xb5a, { KEY_MEDIA } },
+	{ KE_IGNORE, 0x1430, { KEY_RESERVED } },
 	{ KE_END, 0 },
 };
 
-- 
1.7.9


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

* [PATCH 3/3] toshiba_acpi: Refuse to load on machines with buggy INFO implementations
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
  2012-03-06  3:30         ` [PATCH v4 1/3] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
  2012-03-06  3:30         ` [PATCH 2/3] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
@ 2012-03-06  3:30         ` Seth Forshee
  2012-03-09 18:06         ` [PATCH v4 0/3] Expanded hotkey support Seth Forshee
  2012-03-12 14:06         ` Matthew Garrett
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-06  3:30 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: Azael Avalos, Thomas Renninger, linux-kernel, Seth Forshee

Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:

 ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 toshiba_acpi: ACPI INFO method execution failed
 toshiba_acpi: Failed to query hotkey event

All known machines with this implementation also have a WMI interface
with event GUID 59142400-C6A3-40FA-BADB-8A2652834100 which is not seen
on any other models. Refuse to load toshiba_acpi on machines with this
guid.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/Kconfig        |    1 +
 drivers/platform/x86/Makefile       |    4 ++++
 drivers/platform/x86/toshiba_acpi.c |   10 ++++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f995e6e..b420389f 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -580,6 +580,7 @@ config TOPSTAR_LAPTOP
 config ACPI_TOSHIBA
 	tristate "Toshiba Laptop Extras"
 	depends on ACPI
+	depends on ACPI_WMI
 	select LEDS_CLASS
 	select NEW_LEDS
 	depends on BACKLIGHT_CLASS_DEVICE
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 293a320..95ce3a1 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -29,7 +29,11 @@ obj-$(CONFIG_ACPI_WMI)		+= wmi.o
 obj-$(CONFIG_MSI_WMI)		+= msi-wmi.o
 obj-$(CONFIG_ACPI_ASUS)		+= asus_acpi.o
 obj-$(CONFIG_TOPSTAR_LAPTOP)	+= topstar-laptop.o
+
+# toshiba_acpi must link after wmi to ensure that wmi devices are found
+# before toshiba_acpi initializes
 obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
+
 obj-$(CONFIG_TOSHIBA_BT_RFKILL)	+= toshiba_bluetooth.o
 obj-$(CONFIG_INTEL_SCU_IPC)	+= intel_scu_ipc.o
 obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 621b207..b6d0566 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -63,6 +63,8 @@ MODULE_AUTHOR("John Belmonte");
 MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver");
 MODULE_LICENSE("GPL");
 
+#define TOSHIBA_WMI_EVENT_GUID "59142400-C6A3-40FA-BADB-8A2652834100"
+
 /* Scan code for Fn key on TOS1900 models */
 #define TOS1900_FN_SCAN		0x6e
 
@@ -1263,6 +1265,14 @@ static int __init toshiba_acpi_init(void)
 {
 	int ret;
 
+	/*
+	 * Machines with this WMI guid aren't supported due to bugs in
+	 * their AML. This check relies on wmi initializing before
+	 * toshiba_acpi to guarantee guids have been identified.
+	 */
+	if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID))
+		return -ENODEV;
+
 	toshiba_proc_dir = proc_mkdir(PROC_TOSHIBA, acpi_root_dir);
 	if (!toshiba_proc_dir) {
 		pr_err("Unable to create proc dir " PROC_TOSHIBA "\n");
-- 
1.7.9


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

* Re: [PATCH v4 0/3] Expanded hotkey support
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
                           ` (2 preceding siblings ...)
  2012-03-06  3:30         ` [PATCH 3/3] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
@ 2012-03-09 18:06         ` Seth Forshee
  2012-03-12 14:06         ` Matthew Garrett
  4 siblings, 0 replies; 22+ messages in thread
From: Seth Forshee @ 2012-03-09 18:06 UTC (permalink / raw)
  To: Matthew Garrett, platform-driver-x86
  Cc: Azael Avalos, Thomas Renninger, linux-kernel

On Mon, Mar 05, 2012 at 09:30:30PM -0600, Seth Forshee wrote:
> New version of the patches which remove the need to modify the EC
> driver.
> 
> Changes since v3:
> 
>  * Drop patch to add ec_get_handle()
>  * Use acpi_get_devices() to get EC handle
> 
> Thanks,
> Seth

Matthew, do these look okay for 3.4 now that there's no dependency on
changing the EC driver?

Thanks,
Seth


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

* Re: [PATCH v4 0/3] Expanded hotkey support
  2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
                           ` (3 preceding siblings ...)
  2012-03-09 18:06         ` [PATCH v4 0/3] Expanded hotkey support Seth Forshee
@ 2012-03-12 14:06         ` Matthew Garrett
  2012-03-15 15:51           ` Seth Forshee
  4 siblings, 1 reply; 22+ messages in thread
From: Matthew Garrett @ 2012-03-12 14:06 UTC (permalink / raw)
  To: Seth Forshee
  Cc: platform-driver-x86, Azael Avalos, Thomas Renninger, linux-kernel, lenb

On Mon, Mar 05, 2012 at 09:30:30PM -0600, Seth Forshee wrote:
> New version of the patches which remove the need to modify the EC
> driver.
> 
> Changes since v3:
> 
>  * Drop patch to add ec_get_handle()
>  * Use acpi_get_devices() to get EC handle

I'm not thrilled by this. I think making the change in the ec driver is 
the appropriate thing to do rather than duplicating this code elsewhere 
- Len, what's the holdup in merging that?

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

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

* Re: [PATCH v4 0/3] Expanded hotkey support
  2012-03-12 14:06         ` Matthew Garrett
@ 2012-03-15 15:51           ` Seth Forshee
  2012-03-15 16:10             ` Matthew Garrett
  0 siblings, 1 reply; 22+ messages in thread
From: Seth Forshee @ 2012-03-15 15:51 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: platform-driver-x86, Azael Avalos, Thomas Renninger, linux-kernel, lenb

On Mon, Mar 12, 2012 at 02:06:52PM +0000, Matthew Garrett wrote:
> On Mon, Mar 05, 2012 at 09:30:30PM -0600, Seth Forshee wrote:
> > New version of the patches which remove the need to modify the EC
> > driver.
> > 
> > Changes since v3:
> > 
> >  * Drop patch to add ec_get_handle()
> >  * Use acpi_get_devices() to get EC handle
> 
> I'm not thrilled by this. I think making the change in the ec driver is 
> the appropriate thing to do rather than duplicating this code elsewhere 
> - Len, what's the holdup in merging that?

Still no response. Do we have any other options? I'd like to get these
changes in 3.4 if at all possible so I'm not working with a forked
version of the driver.

Seth


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

* Re: [PATCH v4 0/3] Expanded hotkey support
  2012-03-15 15:51           ` Seth Forshee
@ 2012-03-15 16:10             ` Matthew Garrett
  0 siblings, 0 replies; 22+ messages in thread
From: Matthew Garrett @ 2012-03-15 16:10 UTC (permalink / raw)
  To: platform-driver-x86, Azael Avalos, Thomas Renninger, linux-kernel, lenb

On Thu, Mar 15, 2012 at 10:51:05AM -0500, Seth Forshee wrote:
> On Mon, Mar 12, 2012 at 02:06:52PM +0000, Matthew Garrett wrote:
> > I'm not thrilled by this. I think making the change in the ec driver is 
> > the appropriate thing to do rather than duplicating this code elsewhere 
> > - Len, what's the holdup in merging that?
> 
> Still no response. Do we have any other options? I'd like to get these
> changes in 3.4 if at all possible so I'm not working with a forked
> version of the driver.

If I don't hear back from Len soon I'll just take this through the x86 
platform driver tree.

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

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

end of thread, other threads:[~2012-03-15 16:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-18 19:44 [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
2012-01-18 19:44 ` [PATCH v3 1/4] ACPI: EC: Add ec_get_handle() Seth Forshee
2012-01-18 19:44 ` [PATCH v3 2/4] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
2012-01-18 19:44 ` [PATCH v3 3/4] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
2012-01-18 19:44 ` [PATCH v3 4/4] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
2012-02-06 15:06 ` [PATCH v3 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
2012-02-06 15:15   ` Matthew Garrett
2012-02-10 16:56     ` Seth Forshee
2012-02-22 21:43       ` Seth Forshee
2012-03-05 22:04     ` Seth Forshee
2012-03-05 23:01       ` Randy Dunlap
2012-03-05 23:34         ` Seth Forshee
2012-03-06  0:55           ` Randy Dunlap
2012-03-06  3:20             ` Seth Forshee
2012-03-06  3:30       ` [PATCH v4 0/3] " Seth Forshee
2012-03-06  3:30         ` [PATCH v4 1/3] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
2012-03-06  3:30         ` [PATCH 2/3] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
2012-03-06  3:30         ` [PATCH 3/3] toshiba_acpi: Refuse to load on machines with buggy INFO implementations Seth Forshee
2012-03-09 18:06         ` [PATCH v4 0/3] Expanded hotkey support Seth Forshee
2012-03-12 14:06         ` Matthew Garrett
2012-03-15 15:51           ` Seth Forshee
2012-03-15 16:10             ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).