Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The number of temperature sensors that read the temperature was reduc… #394

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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