[PATCH v2 3/4] platform/x86: thinkpad_acpi: Support for system debug info hotkey

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

 



New Lenovo platforms are adding the FN+N key to generate system debug
details that support can use for collecting important details on any
customer cases for Windows.
Add the infrastructure so we can do the same on Linux by generating a
SYS_VENDOR keycode to userspace.

Signed-off-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx>
Signed-off-by: Nitin Joshi <njoshi1@xxxxxxxxxx>
---
Changes in v2: 
 - Improved comments on keycodes in init function.
 - Filled in missing gaps

 drivers/platform/x86/thinkpad_acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 6d04d45e8d45..a2f21e958d39 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1789,6 +1789,10 @@ enum {	/* hot key scan codes (derived from ACPI DSDT) */
 	TP_ACPI_HOTKEYSCAN_NOTIFICATION_CENTER,
 	TP_ACPI_HOTKEYSCAN_PICKUP_PHONE,
 	TP_ACPI_HOTKEYSCAN_HANGUP_PHONE,
+	TP_ACPI_HOTKEYSCAN_AMT_TOGGLE,
+	TP_ACPI_HOTKEYSCAN_CAMERA_SHUTTER,
+	TP_ACPI_HOTKEYSCAN_DOUBLETAP_TOGGLE,
+	TP_ACPI_HOTKEYSCAN_SYS_DEBUG_INFO,
 	TP_ACPI_HOTKEYSCAN_DOUBLETAP,
 
 	/* Hotkey keymap size */
@@ -3340,6 +3344,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
 		KEY_NOTIFICATION_CENTER,	/* Notification Center */
 		KEY_PICKUP_PHONE,		/* Answer incoming call */
 		KEY_HANGUP_PHONE,		/* Decline incoming call */
+		KEY_UNKNOWN,			/* AMT_TOGGLE handled in driver, 0x31a */
+		KEY_UNKNOWN,			/* Camera Shutter Switch, 0X31b */
+		KEY_UNKNOWN,			/* DOUBLETAP_TOGGLE, 0x31c */
+		KEY_VENDOR,                     /* System debug info, 0x31D */
 		KEY_PROG1,                      /* Trackpoint doubletap */
 		},
 	};
-- 
2.44.0





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

  Powered by Linux