-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The number of temperature sensors that read the temperature was reduc…
…ed from five to three. (#394)
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
package/patches/linux/0040-The-number-of-temperature-sensors-that-read-the-temp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|