Skip to content

Commit 2340887

Browse files
Vilez0ij-intel
authored andcommitted
platform/x86: hp-wmi: Add support for Fn+P hotkey
Add support for the Fn+P hotkey found on newer HP Victus (and probably newer Omen) laptops. This hotkey is intended for use with Omen Gaming Hub to change the performance profile (see [1]). Pressing Fn+P under linux produced the following warning in dmesg: > hp_wmi: Unknown event_id - 27 - 0x7 Implemented a handling for this event so that the hotkey cycles between the platform profiles when triggered. Tested on Victus 16-s1011nt (9Z791EA, MB 8C9C). Changes in v2: - Make the key just switches between platform profiles instead of assigning a key event code. - v1: https://lore.kernel.org/all/[email protected]/ [1]: https://jpcdn.it/img/adadf6c927ffeb75afd8038f95db400a.png Signed-off-by: Edip Hazuri <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 3010da6 commit 2340887

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/platform/x86/hp/hp-wmi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ enum hp_wmi_event_ids {
122122
HPWMI_BATTERY_CHARGE_PERIOD = 0x10,
123123
HPWMI_SANITIZATION_MODE = 0x17,
124124
HPWMI_CAMERA_TOGGLE = 0x1A,
125+
HPWMI_FN_P_HOTKEY = 0x1B,
125126
HPWMI_OMEN_KEY = 0x1D,
126127
HPWMI_SMART_EXPERIENCE_APP = 0x21,
127128
};
@@ -981,6 +982,9 @@ static void hp_wmi_notify(union acpi_object *obj, void *context)
981982
key_code, 1, true))
982983
pr_info("Unknown key code - 0x%x\n", key_code);
983984
break;
985+
case HPWMI_FN_P_HOTKEY:
986+
platform_profile_cycle();
987+
break;
984988
case HPWMI_OMEN_KEY:
985989
if (event_data) /* Only should be true for HP Omen */
986990
key_code = event_data;

0 commit comments

Comments
 (0)