Page MenuHomeFreeBSD

TMP461: Add support for ADT7461 sensor
ClosedPublic

Authored by mkoz_semihalf.com on Sep 6 2022, 8:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 10 2024, 7:25 AM
Unknown Object (File)
Oct 10 2024, 7:25 AM
Unknown Object (File)
Oct 10 2024, 7:24 AM
Unknown Object (File)
Oct 10 2024, 7:24 AM
Unknown Object (File)
Oct 3 2024, 4:13 PM
Unknown Object (File)
Oct 1 2024, 9:06 PM
Unknown Object (File)
Oct 1 2024, 4:02 PM
Unknown Object (File)
Sep 29 2024, 8:38 PM
Subscribers

Details

Summary

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mkoz_semihalf.com 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.