]> www.infradead.org Git - users/jedix/linux-maple.git/commit
alienware-wmi: create_thermal_profile() no longer brute-forces IDs
authorKurt Borja <kuurtb@gmail.com>
Mon, 11 Nov 2024 18:36:23 +0000 (15:36 -0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Sat, 16 Nov 2024 14:50:15 +0000 (16:50 +0200)
commitbfcda5cbcdb642a64d5b8a0229842dca7917ac6e
treeebb383852bf2d17bb19636a9f27417803126cbd2
parent01bd181d21cf65e43f30948f9216571218732a12
alienware-wmi: create_thermal_profile() no longer brute-forces IDs

WMAX_METHOD_THERMAL_INFORMATION has a *system description* operation
that outputs a buffer with the following structure:

out[0] -> Number of fans
out[1] -> Number of sensors
out[2] -> 0x00
out[3] -> Number of thermal modes

This is now used by create_thermal_profile() to retrieve available thermal
codes instead of brute-forcing every ID.

Tested on an Alienware x15 R1. Verified by checking ACPI tables of
supported models.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20241111183623.14691-1-kuurtb@gmail.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/alienware-wmi.c