Commit Graph

5 Commits

Author SHA1 Message Date
Luiz Otavio O Souza
9d6672e13b Fix the deciKelvin to Celsius conversion in kernel.
After r285994, sysctl(8) was fixed to use 273.15 instead of 273.20 as 0C
reference and as result, the temperature read in sysctl(8) now exibits a
+0.1C difference.

This commit fix the kernel references to match the reference value used in
sysctl(8) after r285994.

Sponsored by:	Rubicon Communications (Netgate)
2016-05-22 13:58:32 +00:00
Luiz Otavio O Souza
4a5fa7b2e3 Fix off-by-one bugs.
Spotted by:	rpaulo (on another review)
2015-03-10 14:55:05 +00:00
Luiz Otavio O Souza
91e38bd663 Replace hardcoded sizes by sizeof() and nitems().
Set all the sysctls as CTLFLAG_MPSAFE.
2015-02-17 20:29:42 +00:00
Luiz Otavio O Souza
7628ccf06e Fix the display of negative temperatures.
Fix the setting of TOS (overtemperature shutdown) and THYST (hysteresis
temperature).
2015-02-17 20:08:40 +00:00
Luiz Otavio O Souza
dd75f2c5eb Add the lm75 i2c digital temperature sensor driver.
This driver supports the low and high precision models (9 and 11 bits) and
it will auto-detect the both variants.

The driver expose the temperature registers (actual temperature, shutdown
and hysteresys temperature) and also the configuration register.

It was tested on FDT systems: RPi, BBB and on non-FDT systems: AR71xx, with
both, hardware i2c controllers (when available) and gpioiic(4).

This provides a simple and cheap way for verifying the i2c bus on embedded
systems.
2014-05-10 12:19:02 +00:00