1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/bcm27xx/patches-5.15/950-0425-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch

25 lines
843 B
Diff
Raw Normal View History

2022-04-22 15:00:47 +00:00
From b49dea974d69bda9954d307f248d1a1881189420 Mon Sep 17 00:00:00 2001
2021-11-24 17:32:01 +00:00
From: Dom Cobley <popcornmix@gmail.com>
Date: Thu, 8 Jul 2021 13:48:11 +0100
2022-04-22 15:00:47 +00:00
Subject: [PATCH 425/828] bcm2711_thermal: Don't clamp temperature at zero
2021-11-24 17:32:01 +00:00
The temperature sensor is valid below zero and the linux framework is happy with it.
See: https://www.raspberrypi.org/forums/viewtopic.php?f=98&t=315382
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
---
drivers/thermal/broadcom/bcm2711_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/thermal/broadcom/bcm2711_thermal.c
+++ b/drivers/thermal/broadcom/bcm2711_thermal.c
2022-04-22 15:00:47 +00:00
@@ -52,7 +52,7 @@ static int bcm2711_get_temp(void *data,
2021-11-24 17:32:01 +00:00
/* Convert a HW code to a temperature reading (millidegree celsius) */
t = slope * val + offset;
- *temp = t < 0 ? 0 : t;
+ *temp = t;
return 0;
}