[PATCH v2] platform/x86: huawei-wmi: add camera toggle keycode

Ruzal Daminov <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Honor MagicBook laptops emit WMI event code 0x288 when pressing the
camera e-shutter / privacy toggle key (Fn+F8 on Honor).

Add the missing 0x288 keycode to huawei_wmi_keymap[] in correct numerical
order and map it to KEY_CAMERA_ACCESS_TOGGLE.

Tested on Honor MagicBook X14 Plus (FMI-76, AMD Ryzen 8845HS).

Signed-off-by: Ruzal Daminov <[email protected]>
---
v2:
 - Drop duplicate keys already present in the table.
 - Remove leading zeros to match existing table style.
 - Place 0x288 in correct numerical order.
 - Map 0x288 to KEY_CAMERA_ACCESS_TOGGLE.

 drivers/platform/x86/huawei-wmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c
index 93cca17fdf5868..b5463edc4053d4 100644
--- a/drivers/platform/x86/huawei-wmi.c
+++ b/drivers/platform/x86/huawei-wmi.c
@@ -78,6 +78,7 @@ static const struct key_entry huawei_wmi_keymap[] = {
 	{ KE_KEY,    0x285, { KEY_VOLUMEDOWN } },
 	{ KE_KEY,    0x286, { KEY_VOLUMEUP } },
 	{ KE_KEY,    0x287, { KEY_MICMUTE } },
+	{ KE_KEY,    0x288, { KEY_CAMERA_ACCESS_TOGGLE } },
 	{ KE_KEY,    0x289, { KEY_WLAN } },
 	// Huawei |M| key
 	{ KE_KEY,    0x28a, { KEY_CONFIG } },
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.