]> Git Repo - linux.git/commitdiff
thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures
authorHans de Goede <[email protected]>
Wed, 14 Jun 2023 10:07:56 +0000 (12:07 +0200)
committerRafael J. Wysocki <[email protected]>
Thu, 15 Jun 2023 16:07:48 +0000 (18:07 +0200)
Since commit 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel
TCC library") intel_soc_dts_iosf is reporting the wrong temperature.

The driver expects tj_max to be in milli-degrees-celcius but after
the switch to the TCC library this is now in degrees celcius so
instead of e.g. 90000 it is set to 90 causing a temperature 45
degrees below tj_max to be reported as -44910 milli-degrees
instead of as 45000 milli-degrees.

Fix this by adding back the lost factor of 1000.

Fixes: 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCC library")
Reported-by: Bernhard Krug <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Zhang Rui <[email protected]>
Cc: 6.3+ <[email protected]> # 6.3+
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/thermal/intel/intel_soc_dts_iosf.c

index f99dc7e4ae893949e1fb8009982f2a922aeeb0e5..db97499f4f0ab01d829167b84e5303cd8034b56d 100644 (file)
@@ -398,7 +398,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
        spin_lock_init(&sensors->intr_notify_lock);
        mutex_init(&sensors->dts_update_lock);
        sensors->intr_type = intr_type;
-       sensors->tj_max = tj_max;
+       sensors->tj_max = tj_max * 1000;
        if (intr_type == INTEL_SOC_DTS_INTERRUPT_NONE)
                notification = false;
        else
This page took 0.05235 seconds and 4 git commands to generate.