Skip to content

Commit 0bb619f

Browse files
jwrdegoederafaeljw
authored andcommitted
thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures
Since commit 955fb87 ("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: 955fb87 ("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]>
1 parent 858fd16 commit 0bb619f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/intel_soc_dts_iosf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
398398
spin_lock_init(&sensors->intr_notify_lock);
399399
mutex_init(&sensors->dts_update_lock);
400400
sensors->intr_type = intr_type;
401-
sensors->tj_max = tj_max;
401+
sensors->tj_max = tj_max * 1000;
402402
if (intr_type == INTEL_SOC_DTS_INTERRUPT_NONE)
403403
notification = false;
404404
else

0 commit comments

Comments
 (0)