Page MenuHomeFreeBSD

CPU temperature sensor for jh7110
Needs ReviewPublic

Authored by bscott_bunyatech.com.au on Mon, Sep 7, 11:35 AM.
Tags
Referenced Files
F171079237: D59478.id186120.diff
Tue, Sep 8, 2:11 PM
F171076219: D59478.id.diff
Tue, Sep 8, 1:41 PM
F171062418: D59478.id186120.diff
Tue, Sep 8, 11:43 AM
F171048593: D59478.id.diff
Tue, Sep 8, 9:46 AM
F171014312: D59478.diff
Tue, Sep 8, 4:56 AM
Subscribers

Details

Reviewers
mhorne
Group Reviewers
riscv
Summary

This patch creates a cpu temperature sensor for the jh7110 SoC.

The calibration numbers come from the openbsd driver but are reworked to produce a result in K rather than C.

The temperature is exposed as a sysctl, dev.jh7110_temp.0.temperature but I have also exposed it as dev.cpu.0.temperature because that's where you find it on a RaspberryPi so it's a lot more obvious. I think it should really only be in one place but don't know where that should be.

Test Plan

% sysctl -a dev.jh7110_temp.0.temperature dev.cpu.0.temperature
dev.jh7110_temp.0.temperature: 27.962C
dev.cpu.0.temperature: 27.962C

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped