Page MenuHomeFreeBSD

TMP461: Add support for ADT7461 sensor

Authored by on Sep 6 2022, 8:36 AM.
Referenced Files
Unknown Object (File)
Jan 4 2023, 4:42 PM
Unknown Object (File)
Dec 15 2022, 7:47 PM
Unknown Object (File)
Dec 14 2022, 10:27 PM
Unknown Object (File)
Dec 1 2022, 1:46 AM



TMP461: Add support for ADT7461 sensor

The register map failry similar, with one difference in the local temperature register width.
Both sensors support two reading - "local" and "remote".
While here add support for the latter one.
The ADT7461 doesn't update the temperature correctly, unless a write transaction
is done before every read. Do just that as a workaround for this issue.

Tested on LS1046ARDB.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline created this revision.
manu requested changes to this revision.Sep 7 2022, 7:11 AM

We usually don't rename every function when we find that one driver is compatible with some other part. It makes review harder as there is some unrelated changes with code changes.
Also the temp_* aren't good if you have any kernel panic in those function and see that function in the backtrace, please revert that part.

This revision now requires changes to proceed.Sep 7 2022, 7:11 AM

Revert names
Add mutex to tmp461_read_temperature() function
Add software context for data

This revision is now accepted and ready to land.Sep 9 2022, 10:17 AM
This revision was automatically updated to reflect the committed changes.