Commit Graph

344 Commits

Author SHA1 Message Date
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
jmcneill
622947f93d add support for TPS65950 watchdog timer 2012-12-31 19:47:27 +00:00
jmcneill
72dd8faac9 TI TPS65950 driver, right now about all it can do is control LEDs 2012-12-31 13:26:42 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
pgoyette
34e5f77540 Initialize the sysctl(9) stuff before configuring the spd(4) devices.
Otherwise, the devices do not create their own sysctl nodes!
2012-09-12 00:36:41 +00:00
jakllsch
5a74ca386e pic16lcreg.h has been unused since removal of Xbox support, remove. 2012-09-01 15:06:57 +00:00
mlelstv
e5129e3384 Use const nodes. Let sysctl_createv initialize sysctl_data. 2012-07-29 07:04:09 +00:00
matt
1750060a5d Use (void *) instead of (type **) which gcc complains about. 2012-07-28 23:03:47 +00:00
matt
1d3ffa8e77 Clean up error messages.
Tidy some logic.
2012-07-25 03:07:37 +00:00
dsl
e21a34c25e Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
pgoyette
865357bdaf Update handling of sysctl stuff when built as modules 2012-05-31 16:09:33 +00:00
wiz
0d8b40f040 Fix logical errors (&& instead of & in a few places). 2012-04-28 17:27:08 +00:00
pgoyette
6ecf19e095 Identify SMBus block-mode operations.
XXX Nothing in the kernel issues block-mode commands, and each i2c bus
XXX driver needs its own support for the block-mode operations.
2012-04-22 14:10:36 +00:00
bouyer
5358272642 always set *data to appease gcc -03 (some users of cx24227_readreg() don't
check return value for error).
2012-03-15 16:20:36 +00:00