]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
platform/x86: asus-wmi: Modify behaviour of Fn+F5 fan key
authorLuke D. Jones <luke@ljones.dev>
Fri, 26 Aug 2022 00:42:09 +0000 (12:42 +1200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 26 Aug 2022 09:35:19 +0000 (11:35 +0200)
commit601eb4c8e1500285d1c40eacb1e2da19bf220e12
tree99a16426dff160468391f8a97bb8ffe8ea00c1c5
parent98a2aea68873db440770153b4e87d0e1e6dd7a90
platform/x86: asus-wmi: Modify behaviour of Fn+F5 fan key

Some more recent TUF laptops have both fan_boost and thermal_throttle.
The key code for Fn+F5 is also different and unmapped.

This patch adjusts the asus_wmi_handle_event_code() match to match
for both 0x99 and 0xAE, and run both mode switch functions for
fan_boost and/or thermal_throttle if either are available.

It is required that both are tried, as in some instances the ACPI
set-method for one may not have any code body within it even though
it was returned as supported by the get method.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20220826004210.356534-2-luke@ljones.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-nb-wmi.c
drivers/platform/x86/asus-wmi.c