Page MenuHomeFreeBSD

asmc: deduplicate sensor converters and cause sysctls
ClosedPublic

Authored by guest-seuros on Thu, Jun 25, 9:57 PM.
Referenced Files
Unknown Object (File)
Mon, Jul 6, 12:55 AM
Unknown Object (File)
Sun, Jul 5, 10:34 PM
Unknown Object (File)
Sat, Jul 4, 8:42 PM
Unknown Object (File)
Sat, Jul 4, 6:43 AM
Unknown Object (File)
Sat, Jul 4, 6:34 AM
Unknown Object (File)
Sat, Jul 4, 5:30 AM
Unknown Object (File)
Sat, Jul 4, 4:43 AM
Unknown Object (File)
Thu, Jul 2, 7:52 PM
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.Fri, Jun 26, 10:39 PM
This revision now requires review to proceed.Sat, Jun 27, 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.Sat, Jun 27, 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.