[PATCH 2/2] platform/x86: panasonic-laptop: allow to use all hotkeys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>

commit ed83c9171829 broke the hotkeys on my Toughbook CF-51.
I'm questioning the general validity of that commit, but as I only
have a single machine to test, add a module parameter to allow making
it work at runtime.

Fixes: ed83c9171829 platform/x86: panasonic-laptop: Resolve hotkey double trigger bug
Signed-off-by: Stefan Seyfried <seife+kernel@xxxxxxxxxxxxxx>
---
 drivers/platform/x86/panasonic-laptop.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index ca6137f4000f..83acae75aee2 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -141,6 +141,9 @@ MODULE_AUTHOR("Martin Lucina <mato@xxxxxxxxxx>");
 MODULE_AUTHOR("Kenneth Chan <kenneth.t.chan@xxxxxxxxx>");
 MODULE_DESCRIPTION("ACPI HotKey driver for Panasonic Let's Note laptops");
 MODULE_LICENSE("GPL");
+static bool hotkey_input;
+module_param(hotkey_input, bool, 0644);
+MODULE_PARM_DESC(hotkey_input, "Send all hotkeys to the input subsystem");
 
 #define LOGPREFIX "pcc_acpi: "
 
@@ -785,7 +788,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
 	}
 
 	/* for the magic values, see panasonic_keymap[] above */
-	if (key == 7 || key == 9 || key == 10) {
+	if (hotkey_input || key == 7 || key == 9 || key == 10) {
 		if (!sparse_keymap_report_event(hotk_input_dev,
 						key, updown, false))
 			pr_err("Unknown hotkey event: 0x%04llx\n", result);
-- 
2.36.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux