VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> 2021-06-05 10:52:11 +0200 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-20 16:00:40 +0200 commit: 2292bba57bb6c67ecc5223a616d809519eabac80 parent: 31402780830329bb8049eafcb023b6ebcf16e5ab
Commit Summary:
thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index e1e412348076..1a60adb1d30a 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -143,7 +143,7 @@ static void rcar_gen3_thermal_calc_coefs(struct rcar_gen3_thermal_tsc *tsc,
 	 * Division is not scaled in BSP and if scaled it might overflow
 	 * the dividend (4095 * 4095 << 14 > INT_MAX) so keep it unscaled
 	 */
-	tsc->tj_t = (FIXPT_INT((ptat[1] - ptat[2]) * 157)
+	tsc->tj_t = (FIXPT_INT((ptat[1] - ptat[2]) * (ths_tj_1 - TJ_3))
 		     / (ptat[0] - ptat[2])) + FIXPT_INT(TJ_3);
 
 	tsc->coef.a1 = FIXPT_DIV(FIXPT_INT(thcode[1] - thcode[2]),