Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704108
| From | Mario Limonciello <mario.limonciello@dell.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] intel-vbtn: match power button on press rather than release |
| Date | 2017-08-04 19:10 +0200 |
| Message-ID | <uaOgN-1p8-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This fixes a problem where the system gets stuck in a loop
unable to wakeup via power button in s2idle.
The problem happens because:
- press power button:
- system emits 0xc0 (power press), event ignored
- system emits 0xc1 (power release), event processed,
emited as KEY_POWER
- set wakeup_mode to true
- system goes to s2idle
- press power button
- system emits 0xc0 (power press), wakeup_mode is true,
system wakes
- system emits 0xc1 (power release), event processed,
emited as KEY_POWER
- system goes to s2idle again
To avoid this situation, process the presses (which matches what
intel-hid does too).
Verified on an Dell XPS 9365
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
---
drivers/platform/x86/intel-vbtn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 61f1063..4809267 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -36,8 +36,8 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
/* In theory, these are HID usages. */
static const struct key_entry intel_vbtn_keymap[] = {
- { KE_IGNORE, 0xC0, { KEY_POWER } }, /* power key press */
- { KE_KEY, 0xC1, { KEY_POWER } }, /* power key release */
+ { KE_KEY, 0xC0, { KEY_POWER } }, /* power key press */
+ { KE_IGNORE, 0xC1, { KEY_POWER } }, /* power key release */
{ KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */
{ KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */
{ KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] intel-vbtn: match power button on press rather than release Mario Limonciello <mario.limonciello@dell.com> - 2017-08-04 19:10 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release Darren Hart <dvhart@infradead.org> - 2017-08-04 19:40 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-05 01:40 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release Darren Hart <dvhart@infradead.org> - 2017-08-05 23:00 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-06 00:30 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release Darren Hart <dvhart@infradead.org> - 2017-08-07 01:30 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release "Rafael J. Wysocki" <rafael@kernel.org> - 2017-08-07 02:40 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release AceLan Kao <acelan.kao@canonical.com> - 2017-08-07 03:00 +0200
Re: [PATCH] intel-vbtn: match power button on press rather than release Darren Hart <dvhart@infradead.org> - 2017-08-07 06:00 +0200
csiph-web