Page MenuHomeFreeBSD

asmc: deduplicate sensor converters and cause sysctls
ClosedPublic

Authored by guest-seuros on Jun 25 2026, 9:57 PM.
Referenced Files
Unknown Object (File)
Sun, Aug 23, 1:57 AM
Unknown Object (File)
Sat, Aug 22, 10:51 PM
Unknown Object (File)
Sat, Aug 22, 9:25 AM
Unknown Object (File)
Wed, Aug 19, 4:41 PM
Unknown Object (File)
Fri, Aug 14, 1:44 PM
Unknown Object (File)
Sat, Aug 8, 6:31 PM
Unknown Object (File)
Sun, Aug 2, 4:09 AM
Unknown Object (File)
Sun, Aug 2, 12:44 AM
Subscribers

Details

Summary

Replace per-type spXX_to_milli() functions with a table-driven
asmc_sensor_convert() that looks up the divisor by SMC type string.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 74342
Build 71225: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jun 26 2026, 10:39 PM
This revision now requires review to proceed.Jun 27 2026, 10:38 PM
adrian added inline comments.
sys/dev/asmc/asmc.c
2595

oh interesting, is this handling key differences between sleep and non-sleep stuff? what did the old code do? Just assume MSSP always, right?

This revision is now accepted and ready to land.Jun 27 2026, 11:39 PM
guest-seuros added inline comments.
sys/dev/asmc/asmc.c
2595

The old code had two separate handlers each hardcoded to its own key and is_sleep flag.

The diff merged them into one handler using arg2 as params.

No new logic was introduced in this diff.