Thread (26 messages) 26 messages, 5 authors, 2017-07-09

Re: [PATCH 0/3] ACPI / sleep: Support power button wakeup from S2I on recent Dell laptops

From: Rafael J. Wysocki <hidden>
Date: 2017-06-12 20:42:04
Also in: linux-acpi

On Monday, June 12, 2017 10:35:50 PM Jérôme de Bretagne wrote:
quoted
I don't see HEBC in the ASL for the 7275.  It would be good to provide
this information across both of the BIOS versions (working and non-working).

As well as what
        status = acpi_evaluate_integer(handle, "BTNC", NULL, &button_cap);
evaluates as on both too.
I'll provide both BTNC and HEBC log results to compare, with both BIOS
versions, a bit later today.
quoted
Since this platform shipped with Win 8.1 initially rather than Win10,
It's possible 5 button array was not part of the INT33D5 spec at that time
and wasn't used by the Windows Intel HID filter driver.

My suspicion:
Win 8.1 didn't support 5 button array definition yet and those events that
are normally part of 5 button array (as detected by bit 17) were coming
across as regular HID event codes (like you were seeing 0xCE and 0xCF
unknown events from debug log when OS was running).
That was my assumption also, since my earlier 3-liner patch was doing
this exactly: trying to wake up on a regular 0xCE event. And it did work.
OK

Can you try the patch below, please?

---
 drivers/platform/x86/intel-hid.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-pm/drivers/platform/x86/intel-hid.c
===================================================================
--- linux-pm.orig/drivers/platform/x86/intel-hid.c
+++ linux-pm/drivers/platform/x86/intel-hid.c
@@ -270,12 +270,17 @@ static int intel_hid_probe(struct platfo
 	}
 
 	/* Setup 5 button array */
-	status = acpi_evaluate_integer(handle, "HEBC", NULL, &event_cap);
-	if (ACPI_SUCCESS(status) && (event_cap & 0x20000)) {
-		dev_info(&device->dev, "platform supports 5 button array\n");
-		err = intel_button_array_input_setup(device);
-		if (err)
-			pr_err("Failed to setup Intel 5 button array hotkeys\n");
+	if (acpi_has_method(handle, "BTNC") && acpi_has_method(handle, "BTNE")) {
+		unsigned long long event_cap;
+
+		status = acpi_evaluate_integer(handle, "HEBC", NULL, &event_cap);
+		if ((ACPI_SUCCESS(status) && (event_cap & 0x20000)) ||
+		    status == AE_NOT_FOUND) {
+			dev_info(&device->dev, "5-button array supported\n");
+			err = intel_button_array_input_setup(device);
+			if (err)
+				dev_dbg(&device->dev, "5-button array setup failure\n");
+		}
 	}
 
 	status = acpi_install_notify_handler(handle,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help