]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: intel-hid: Power button suspend on Dell Latitude 7275
authorJérôme de Bretagne <jerome.debretagne@gmail.com>
Sun, 17 Sep 2017 22:57:12 +0000 (00:57 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Fri, 22 Sep 2017 23:49:47 +0000 (16:49 -0700)
commitb67032da584cf10ca8d54ede6831d07159024a1b
tree71cb03a21f3bbc000a126d7cb4132d71b6df87cd
parent40ada9626826ea63fd2f03b84771bfb51c4bcfdd
platform/x86: intel-hid: Power button suspend on Dell Latitude 7275

On Dell Latitude 7275 the 5-button array is not exposed in the ACPI
tables, but notififies are still sent to the Intel HID device object
(device ID INT33D5) in response to power button actions.  They were
ignored as the intel-hid driver was not prepared to take care of them
until recently.

Power button wakeup from suspend-to-idle was added in:

commit 18544f6c2e92 ("intel-hid: Wake up Dell Latitude 7275 from suspend-to-idle")

However power button suspend doesn't work yet on this platform so it
would be good to add it also.

On the affected platform (for which priv->array is NULL), add a new
upfront check against the power button press notification (0xCE) to
notify_handler(), outside the wakeup mode this time, which allows
reporting the power button press event and triggers the suspend. Also
catch and ignore the corresponding power button release notification
(0xCF) to stop it from being reported as an "unknown event" in the logs.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196115
Tested-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
Acked-By: Mario Limonciello <mario.limonciello@dell.com>
[dvhart: minor coding style and commit message format fix]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/intel-hid.c