]> www.infradead.org Git - users/dwmw2/linux.git/commit
platform/x86: thinkpad_acpi: Do hkey to scancode translation later
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Apr 2024 12:28:16 +0000 (14:28 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 09:44:12 +0000 (11:44 +0200)
commit9e5d6b982c5491a4590fa2d4b5494527c4527407
treee1f80b985318870772035e65f4e49d0e6e64eb14
parentd761684afda3a784b9e5e88281d4f52cc0cffa08
platform/x86: thinkpad_acpi: Do hkey to scancode translation later

Modify hotkey_notify_hotkey() and it helpers to mostly directly operate
on hkey codes (TP_HKEY_EV_* returned by "MHKP") instead of on the 0 -
TPACPI_HOTKEY_MAP_LEN scancodes used for scancode -> keycode translation.

Keeping things in the hkey format as long a possible is a bit cleaner and
this patch prepares things for moving to sparse-keymaps.

Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240424122834.19801-7-hdegoede@redhat.com
drivers/platform/x86/thinkpad_acpi.c