platform/x86: hp-wmi: Setting thermal profile fails with 0x06
authorJorge Lopez <jorge.lopez2@hp.com>
Mon, 12 Sep 2022 19:26:03 +0000 (14:26 -0500)
committerHans de Goede <hdegoede@redhat.com>
Mon, 19 Sep 2022 11:38:31 +0000 (13:38 +0200)
commit00b1829294b7c88ecba92c661fbe6fe347b364d2
treeb786fb4ea31efc455c004d4af4b2fef298d2c18a
parent4b93c6ea4e56c923e86bddffbc862c1bf3597cea
platform/x86: hp-wmi: Setting thermal profile fails with 0x06

Error 0x06 (invalid command parameter) is reported by hp-wmi module
when reading the current thermal profile and then proceed to set it
back. The failing condition occurs in Linux NixOS after user
configures the thermal profile to ‘quiet mode’ in Windows.  Quiet Fan
Mode is supported in Windows but was not supported in hp-wmi module.

This fix adds support for PLATFORM_PROFILE_QUIET in hp-wmi module for
HP notebooks other than HP Omen series.  Quiet thermal profile is not
supported in HP Omen series notebooks.

Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20220912192603.4001-1-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/hp-wmi.c