Skip to content

Commit

Permalink
feat: add sensors for Rockchip RK3566
Browse files Browse the repository at this point in the history
  • Loading branch information
KholkinDmitrii authored and BenBE committed Dec 20, 2024
1 parent ea27926 commit 28dcbd7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions linux/LibSensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ static int tempDriverPriority(const sensors_chip_name* chip) {
{ "bigcore0_thermal", 0 },
{ "bigcore1_thermal", 0 },
{ "bigcore2_thermal", 0 },
/* Rockchip RK3566 */
{ "soc_thermal", 0 },
/* Low priority drivers */
{ "acpitz", 1 },
};
Expand Down Expand Up @@ -242,6 +244,18 @@ void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int existingCPUs, uns
}
}

/* Rockchip RK3566 */
if (existingCPUs == 4) {
if (String_eq(chip->prefix, "soc_thermal")) {
data[1] = temp;
data[2] = temp;
data[3] = temp;
data[4] = temp;
coreTempCount += 4;
continue;
}
}

/* If already set, e.g. Ryzen reporting platform temperature for each die, use the bigger one */
if (isNaN(data[tempID])) {
data[tempID] = temp;
Expand Down

0 comments on commit 28dcbd7

Please sign in to comment.