Skip to content

Commit 01a3c9e

Browse files
authored
Merge pull request #1759 from bk3a12/main
Fix for CPU temperature sensor for Amlogic S905W
2 parents ae59443 + e62e34f commit 01a3c9e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

linux/LibSensors.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ static int tempDriverPriority(const sensors_chip_name* chip) {
158158
{ "cpu5_thermal", 0 },
159159
{ "cpu6_thermal", 0 },
160160
{ "cpu7_thermal", 0 },
161+
/* Amlogic S905W */
162+
{ "scpi_sensors", 0 },
161163
/* Low priority drivers */
162164
{ "acpitz", 1 },
163165
};
@@ -309,6 +311,17 @@ void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int existingCPUs, uns
309311
}
310312
}
311313

314+
/* Amlogic S905W */
315+
if (String_eq(chip->prefix, "scpi_sensors")) {
316+
// Package temperature - assign to ALL cores and package
317+
for (size_t i = 0; i <= existingCPUs; i++) {
318+
data[i] = temp;
319+
}
320+
321+
coreTempCount = existingCPUs;
322+
continue;
323+
}
324+
312325
char *label = sym_sensors_get_label(chip, feature);
313326
if (label) {
314327
bool skip = true;

0 commit comments

Comments
 (0)