Commit Graph

6 Commits

Author SHA1 Message Date
riastradh 2719ac5329 Fix binary search logic.
Doesn't matter for the one user of this, but still.
2014-04-25 23:54:58 +00:00
riastradh 7e61e435b3 Fix copypasta error in apple_smc_write_key_4: uint32_t, not uint16_t. 2014-04-01 17:49:17 +00:00
riastradh 81f56cd2a7 Polish the Apple SMC code with commentary and little fixes. 2014-04-01 17:49:05 +00:00
riastradh 0f339fa6a5 Rework Apple SMC device attachment goo again.
Less bookkeeping at the expense of iteration over all devices when
rescanning applesmc.
2014-04-01 17:48:52 +00:00
riastradh 9456e37730 Rework Apple SMC attachment goo and split into multiple modules.
The four modules are apple_smc for the core functions, apple_smc_acpi
for attachment at acpi, and apple_smc_fan & apple_smc_temp for stuff
on the SMC.

Seems like there's a lot more bookkeeping necessary to maintain
children of an applesmc device implemented by loadable modules.
Maybe there's a better way I just haven't figured out yet.
2014-04-01 17:48:39 +00:00
riastradh 0396c57641 First draft of drivers for the Apple System Management Controller.
Device interface derived by reading the Linux driver source code and
<http:///www.parhelia.ch/blog/statics/k3_keys.html> as of 2012-12-05.

Includes support for attaching fan and temperature sensors to sysmon.
No accelerometer yet.

Compile-tested only, based on some run-testing of experiments from
userland.  Module attachment is not quite finished, so it won't work
yet.
2014-04-01 17:47:36 +00:00