Commit Graph

357 Commits

Author SHA1 Message Date
bouyer ca721aa69b Add a callback to change the regulator outputs.
Tested on beaglebone.
2014-07-20 23:01:22 +00:00
kardel f4fb489c95 allow i2c address 0x01-0x7F
ignore responses if the sensor is in command mode
2014-06-29 09:52:43 +00:00
kardel 21c18910f4 remove artifacts inspired by misleading documentation
fix address calculation macros
fix typoes
2014-06-29 09:06:05 +00:00
tsutsui 2136ca1e28 Use todr_[gs]ettime_ymdhms functions that handle ymdhms format properly.
Compile test only.
2014-06-29 04:04:02 +00:00
kardel 54c2251d60 add HYT-221/271/939 humidity/temperature I2C sensor
extend envsys(4) framework by %rH (relative humidity)
2014-05-18 11:46:23 +00:00
pooka a81a378780 Remove extraneous sysctl setup calls now done as part of regular attach. 2014-04-14 14:30:24 +00:00
christos b2dc35d4a2 fix statement with no effect (Dave Tyson) 2014-04-13 12:42:47 +00:00
skrll 7f6a34a4a9 Fix build.
Hi dh!
2014-03-17 15:57:56 +00:00
dholland a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
pooka 4f6fb3bf35 Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
mlelstv 8aa54a5db6 add three temperature sensors from ST. 2014-01-09 16:51:05 +00:00
jakllsch 7f23e64fd1 Fix whitespace issues. 2014-01-08 16:49:48 +00:00
jakllsch 8b3ffd0418 Add unused tps65217pmic_reg_write() function. 2014-01-08 16:45:14 +00:00
skrll 3546eea784 Remove unused variable.
OK rkujawa
2013-12-31 14:51:46 +00:00
nisimura 2d5e7bdca6 fix an array bound error which was spotted by gcc 4.8 2013-11-08 03:56:10 +00:00
jdc 1f29035404 Add missing braces.
Fix logic error - check the data read from the chip against 0xff.
2013-11-04 15:06:26 +00:00
rkujawa 94950b3125 Fix name of sysctl setup function. 2013-10-28 11:24:08 +00:00
jdc 9297225925 A fan reading of 0xff is also invalid (observed on AlphaServer DS20L). 2013-10-26 18:28:15 +00:00
jdc 71885a597a Add "i2c-at34c02" AT34C02 EEPROM. This is compatible with the AT24C02
EEPROM, apart from software write protection (not supported in our driver).
2013-10-25 14:32:10 +00:00
jdc 2b2120bf58 Allow the EEPROM size to be specified in the kernel configuration by
using flags.
Add the flags values, and configuration examples to the manual page.
2013-10-25 14:23:15 +00:00
jdc 2d66d2af12 Remove extraneous printf(). 2013-10-18 15:16:08 +00:00
christos 6888745cca remove unused variable 2013-10-17 21:18:43 +00:00
jdc 255c74a79f Add lmenv to the configuration framework. 2013-10-15 19:13:32 +00:00
jdc 98357f913f Add a driver for the LM81, LM87, and compatible iic hardware monitors
(lmenv).  Ported from OpenBSD's lm87.c, revision 1.20.
2013-10-15 19:12:41 +00:00
rkujawa 2bfecaf3cd Add forgotten register definitions for previous commit. 2013-10-15 13:43:51 +00:00
rkujawa 2c5d1a916c Add sysctl knobs to set temperature limit and hysteresis. Reaching the limit
causes alert line of the chip to be asserted. These limits could be tied to
critical limit set in envsys, but it's more versatile to keep it as separate
value.
2013-10-15 13:42:52 +00:00
rkujawa f89444f722 Simplify sysctl handling. 2013-10-15 10:27:55 +00:00
rkujawa 3915797645 Clean up register read and write functions, add functions for 8-bit read and
write (needed to access config register). Add sysctl knob to set resolution
from user space.
2013-10-15 10:18:49 +00:00
jdc a2f66b838f Add a property "i2c-indirect-config" to allow/disallow i2c indirect config.
If missing, "allowed" is assumed.  Set it to false for OFW machines.
Patch from martin@.  Removes erroneous i2c probe messages that appeared with
wildcard support.
2013-09-24 18:04:53 +00:00
martin 929a512f58 Fix evil "sizeof(void*)" botch 2013-09-12 20:30:58 +00:00
martin decf386d57 Remove unused variable 2013-09-12 20:20:03 +00:00
martin dffa067438 Remove unused variables 2013-09-12 19:46:31 +00:00
rkujawa c7b0c56c96 Preliminary support for MPL115A2 pressure sensor. It works, but accurracy is
awful.

I should add presure as a new type of sensor to envsys at some point...
2013-09-08 14:59:42 +00:00
matt 33c1c5753b Make gttswi MI and usuable from non-Marvell SoCs.
(should rename to mvi2c but ...)
2013-09-06 00:56:12 +00:00
soren c5606116b4 Allow i2c addr wildcard matching. Use with care! 2013-08-07 19:38:45 +00:00
soren ff7e081f9e Add driver for Nuvoton W83795G voltage/temp/fan/gpio monitoring device.
As used in the HP Microserver N36L/N40L/N54L:

w83795g* at iic? addr 0x2f
gpio* at gpiobus?

Note that the gpio and watchdog functionality appears to be useless on
the Microserver, as the gpio pins don't affect the LED's and a watchdog
trigger does not cause a reset. Perhaps the reset pin just isn't wired.

There are quite flexible fan control options as well as just monitoring,
but it is not clear to me how best to export that function to userspace.
2013-08-06 15:58:25 +00:00
rkujawa 025f5473db Monitor for power source changes and report with appropriate information in
dmesg, a pmf event and sysmon_pswitch event.
2013-08-04 00:24:28 +00:00
kiyohara 148f6d8534 Call iic_exec() with I2C_F_POLL. Don't sleep in probe/attach time. 2013-07-28 06:12:45 +00:00
soren 9387374c52 Use the standard i2c address to DIMM slot mapping to show the slot number. 2013-07-22 13:46:20 +00:00
rkujawa 441ebfd259 Fix typo: s/300/500/ . 2013-05-16 21:25:27 +00:00
jakllsch 2c297d0892 Add WLED register defines. 2013-05-07 01:16:25 +00:00
rkujawa ca20b36e59 Add driver for Microchip MCP9800/1/2/3 temperature sensors. 2013-05-06 22:04:12 +00:00
jakllsch 8ffb004c45 put the one out-of-order register info in its proper sequence 2013-04-28 00:47:20 +00:00
jakllsch 37ee57142f remove trailing whitespace 2013-04-28 00:41:22 +00:00
rkujawa cc58b30d2f Add envsys(4) support to TPS65217 PMIC driver. 2013-04-26 19:32:43 +00:00
rkujawa 31c475759f Add sanity, flexibility and readability to TPS65217 driver. In preparation to
add envsys support.
2013-04-26 15:31:03 +00:00
rkujawa 2ccc14ccde Add minimal support for TPS65217 PMIC as found on BeagleBone. Next step is to
expose regulated voltages through envsys(4).
2013-04-25 20:55:34 +00:00
jdc 4e17786137 Handle direct configuration if ia->ia_name is set, using iic_compat_match().
If ia->ia_name is set, display the name on attach.
Display the size (if known) on attach.
Move the iic_acquire_bus() and iic_release_bus() calls inside the read and
write loops, to avoid holding the bus for the full duration of the read or
write.
2013-02-08 15:14:11 +00:00
jdc 5fc8d04ede Also set ia.ia_size from size when doing direct config. 2013-02-03 16:28:51 +00:00
jmcneill 4ce8a86674 add TPS65950 RTC support 2012-12-31 21:45:36 +00:00