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: Jérôme de Bretagne <hidden>
Date: 2017-06-12 22:51:19
Also in: linux-acpi

quoted
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?
Thank you for this patch proposal. I've applied it but the system with
BIOS 1.1.31 doesn't wake up on short press.

I can see the following (added) messages in the logs for info:

- short press first while suspended -> no wake-up
[  702.567912] intel-hid INT33D5:00: notify_handler with event 0xce
[  702.567913] intel-hid INT33D5:00: 0xce == 0xc0 || !priv->array
[  702.765067] intel-hid INT33D5:00: notify_handler with event 0xcf
[  702.765072] intel-hid INT33D5:00: 0xcf == 0xc0 || !priv->array
- long press then -> waking up the system
[  704.954703] intel-hid INT33D5:00: notify_handler with event 0xce
[  704.954704] intel-hid INT33D5:00: 0xce == 0xc0 || !priv->array
[  711.646088] intel-hid INT33D5:00: notify_handler with event 0xcf
[  711.646092] intel-hid INT33D5:00: unknown event 0xcf

confirming that priv->array is indeed not set, even with the patch below.

With BIOS 1.1.20, I don't have such logs, notify_handler seems never called.

Jérome
quoted hunk ↗ jump to hunk
---
 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