Skip to content

Commit

Permalink
The number of temperature sensors that read the temperature was reduc…
Browse files Browse the repository at this point in the history
…ed from five to three. (#394)
  • Loading branch information
mara-sys authored Nov 22, 2022
1 parent 4c07643 commit fe7e59c
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 832b1aa92c0ca62127151ceef2c2c78690f1822b Mon Sep 17 00:00:00 2001
From: liusuntao <[email protected]>
Date: Mon, 21 Nov 2022 19:44:17 +0800
Subject: [PATCH] The number of temperature sensors that read the temperature
was reduced from five to three.

---
drivers/thermal/canaan_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/canaan_thermal.c b/drivers/thermal/canaan_thermal.c
index 78cdd60..cc014d9 100755
--- a/drivers/thermal/canaan_thermal.c
+++ b/drivers/thermal/canaan_thermal.c
@@ -89,7 +89,7 @@ static int read_temp_single(struct canaan_thermal_data *data,
val = ioread32(data->base + TS_STATUS);
if(val == 0)
return -EAGAIN;
- for(bit = 0; bit < 5; bit++)
+ for(bit = 2; bit < 5; bit++)
{
if((val>>bit) & 0x1)
{
--
2.36.1

0 comments on commit fe7e59c

Please sign in to comment.