]> Gentwo Git Trees - linux/.git/commit
platform/x86: asus-wmi: Fix inconsistent use of thermal policies
authorArmin Wolf <W_Armin@gmx.de>
Thu, 7 Nov 2024 00:38:10 +0000 (01:38 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Nov 2024 09:55:16 +0000 (11:55 +0200)
commit895085ec3f2ed7a26389943729e2904df1f88dc0
treec30a1b856066618a8420d1fafaf0389449cd10d9
parent4ceb681f1822819f78b747ddc189479fead43be2
platform/x86: asus-wmi: Fix inconsistent use of thermal policies

When changing the thermal policy using the platform profile API,
a Vivobook thermal policy is stored in throttle_thermal_policy_mode.

However everywhere else a normal thermal policy is stored inside this
variable, potentially confusing the platform profile.

Fix this by always storing normal thermal policy values inside
throttle_thermal_policy_mode and only do the conversion when writing
the thermal policy to hardware. This also fixes the order in which
throttle_thermal_policy_switch_next() steps through the thermal modes
on Vivobook machines.

Tested-by: Casey G Bowman <casey.g.bowman@intel.com>
Fixes: bcbfcebda2cb ("platform/x86: asus-wmi: add support for vivobook fan profiles")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241107003811.615574-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/asus-wmi.c