]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: acer-wmi: Fix setting of fan behavior
authorArmin Wolf <W_Armin@gmx.de>
Thu, 16 Oct 2025 18:00:05 +0000 (20:00 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 30 Oct 2025 16:26:54 +0000 (18:26 +0200)
commitd8e8362b09d31b0a343c0414015d93fbb250d57d
treecb3996455a83ebeae729f9aaffb3fcc9fb582e19
parent1c72d9c3e0c61468de878d906a65d4cc845718fb
platform/x86: acer-wmi: Fix setting of fan behavior

After studying the linuwu_sense driver
(https://github.com/0x7375646F/Linuwu-Sense) i was able to understand
the meaning of the SetGamingFanBehavior() WMI method:

- the first 16-bit are a bitmap of all fans affected by a fan behavior
  change request.

- the next 8 bits contain four fan mode fields (2-bit), each being
  associated with a bit inside the fan bitmap.

There are three fan modes: auto, turbo and custom.

Use this newfound knowledge to fix the turbo fan handling by setting
the correct bits before calling SetGamingFanBehavior(). Also check
the result of the WMI method call and return an error should the ACPI
firmware signal failure.

Reviewed-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251016180008.465593-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/acer-wmi.c