Patch "platform/x86: hp-wmi: Handle Omen Key event" has been added to the 6.1-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    platform/x86: hp-wmi: Handle Omen Key event

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-hp-wmi-handle-omen-key-event.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cecd9bfb2610a027a7e9644d318ebb717f70c363
Author: Rishit Bansal <rishitbansal0@xxxxxxxxx>
Date:   Sat Jan 21 03:42:14 2023 +0530

    platform/x86: hp-wmi: Handle Omen Key event
    
    [ Upstream commit 3ee5447b2048c8389ed899838a40b40180d50906 ]
    
    Add support to map the "HP Omen Key" to KEY_PROG2. Laptops in the HP
    Omen Series open the HP Omen Command Center application on windows. But,
    on linux it fails with the following message from the hp-wmi driver:
    
    [ 5143.415714] hp_wmi: Unknown event_id - 29 - 0x21a5
    
    Also adds support to map Fn+Esc to KEY_FN_ESC. This currently throws the
    following message on the hp-wmi driver:
    
    [ 6082.143785] hp_wmi: Unknown key code - 0x21a7
    
    There is also a "Win-Lock" key on HP Omen Laptops which supports
    Enabling and Disabling the Windows key, which trigger commands 0x21a4
    and 0x121a4 respectively, but I wasn't able to find any KEY in input.h
    to map this to.
    
    Signed-off-by: Rishit Bansal <rishitbansal0@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230120221214.24426-1-rishitbansal0@xxxxxxxxx
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 0a99058be813..4a3851332ef2 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -90,6 +90,7 @@ enum hp_wmi_event_ids {
 	HPWMI_PEAKSHIFT_PERIOD		= 0x0F,
 	HPWMI_BATTERY_CHARGE_PERIOD	= 0x10,
 	HPWMI_SANITIZATION_MODE		= 0x17,
+	HPWMI_OMEN_KEY			= 0x1D,
 	HPWMI_SMART_EXPERIENCE_APP	= 0x21,
 };
 
@@ -216,6 +217,8 @@ static const struct key_entry hp_wmi_keymap[] = {
 	{ KE_KEY, 0x213b,  { KEY_INFO } },
 	{ KE_KEY, 0x2169,  { KEY_ROTATE_DISPLAY } },
 	{ KE_KEY, 0x216a,  { KEY_SETUP } },
+	{ KE_KEY, 0x21a5,  { KEY_PROG2 } }, /* HP Omen Key */
+	{ KE_KEY, 0x21a7,  { KEY_FN_ESC } },
 	{ KE_KEY, 0x21a9,  { KEY_TOUCHPAD_OFF } },
 	{ KE_KEY, 0x121a9, { KEY_TOUCHPAD_ON } },
 	{ KE_KEY, 0x231b,  { KEY_HELP } },
@@ -810,6 +813,7 @@ static void hp_wmi_notify(u32 value, void *context)
 	case HPWMI_SMART_ADAPTER:
 		break;
 	case HPWMI_BEZEL_BUTTON:
+	case HPWMI_OMEN_KEY:
 		key_code = hp_wmi_read_int(HPWMI_HOTKEY_QUERY);
 		if (key_code < 0)
 			break;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux