Commit ed83c917 authored by Kenneth Chan's avatar Kenneth Chan Committed by Hans de Goede

platform/x86: panasonic-laptop: Resolve hotkey double trigger bug

Sometimes double ACPI events are triggered for brightness, vol and mute
hotkeys. This patch fixes it.
Signed-off-by: default avatarKenneth Chan <kenneth.t.chan@gmail.com>
Link: https://lore.kernel.org/r/20200821181433.17653-8-kenneth.t.chan@gmail.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent e3a9afbb
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* *
* ChangeLog: * ChangeLog:
* Aug.18, 2020 Kenneth Chan <kenneth.t.chan@gmail.com> * Aug.18, 2020 Kenneth Chan <kenneth.t.chan@gmail.com>
* resolve hotkey double trigger
* add write support to mute * add write support to mute
* fix sticky_key init bug * fix sticky_key init bug
* fix naming of platform files for consistency with other * fix naming of platform files for consistency with other
...@@ -597,9 +598,11 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) ...@@ -597,9 +598,11 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
result & 0xf, 0x80, false); result & 0xf, 0x80, false);
} }
if (!sparse_keymap_report_event(hotk_input_dev, if ((result & 0xf) == 0x7 || (result & 0xf) == 0x9 || (result & 0xf) == 0xa) {
result & 0xf, result & 0x80, false)) if (!sparse_keymap_report_event(hotk_input_dev,
pr_err("Unknown hotkey event: 0x%04llx\n", result); result & 0xf, result & 0x80, false))
pr_err("Unknown hotkey event: 0x%04llx\n", result);
}
} }
static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event) static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment