[PATCH 1/1] platform/x86: hp-wmi: support profiles for HP Laptop 15

From: yoy95104

Date: Fri May 15 2026 - 18:14:15 EST


From: yahia ahmed <yahia.a.abdrabou@xxxxxxxxx>

Added board 8B2F to the victus_s_thermal_profile_boards table,
although it is marketed as a notebook, as said in the hp app,
my testing confirms it utilizes the same underlying
structure as other Victus models. In addition i added prt sc
key and mapped it to event 0xb7 and assigned it to KEY_PRINT.

Signed-off-by: yahia ahmed <yahia.a.abdrabou@xxxxxxxxx>
---
drivers/platform/x86/hp/hp-wmi.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 6950bec2a9d8..693031aa1f11 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -11,6 +11,7 @@
* Copyright (C) 2005 Dmitry Torokhov <dtor@xxxxxxx>
*/

+#include <linux/input-event-codes.h>
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/acpi.h>
@@ -36,6 +37,13 @@
#include <linux/types.h>
#include <linux/workqueue.h>

+#include <acpi/acpi_bus.h>
+#include <acpi/acpi_drivers.h>
+
+#ifndef ACPI_AC_CLASS
+#define ACPI_AC_CLASS "ac_adapter"
+#endif
+
MODULE_AUTHOR("Matthew Garrett <mjg59@xxxxxxxxxxxxx>");
MODULE_DESCRIPTION("HP laptop WMI driver");
MODULE_LICENSE("GPL");
@@ -205,10 +213,6 @@ static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8BBE") },
.driver_data = (void *)&victus_s_thermal_params,
},
- {
- .matches = { DMI_MATCH(DMI_BOARD_NAME, "8BC2") },
- .driver_data = (void *)&omen_v1_thermal_params,
- },
{
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8BCA") },
.driver_data = (void *)&omen_v1_thermal_params,
@@ -253,6 +257,10 @@ static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8D87") },
.driver_data = (void *)&omen_v1_no_ec_thermal_params,
},
+ {
+ .matches = { DMI_MATCH(DMI_BOARD_NAME, "8B2F") },
+ .driver_data = (void *)&victus_s_thermal_params,
+ },
{},
};

@@ -407,6 +415,7 @@ struct bios_rfkill2_state {
static const struct key_entry hp_wmi_keymap[] = {
{ KE_KEY, 0x02, { KEY_BRIGHTNESSUP } },
{ KE_KEY, 0x03, { KEY_BRIGHTNESSDOWN } },
+ { KE_KEY, 0xb7, { KEY_PRINT } },
{ KE_KEY, 0x270, { KEY_MICMUTE } },
{ KE_KEY, 0x20e6, { KEY_PROG1 } },
{ KE_KEY, 0x20e8, { KEY_MEDIA } },
@@ -1086,6 +1095,7 @@ static int camera_shutter_input_setup(void)
int err;

camera_shutter_input_dev = input_allocate_device();
+
if (!camera_shutter_input_dev)
return -ENOMEM;

--
2.54.0