monstrous if-then-else-if constructs.
2. Display module capacity in GB if it is at least 1GB.
3. Indicate if a memory module is "registered".
4. For DDR3, indicate if a temp-sensor is present.
Inspired by similar changes in OpenBSD's spdmem(4).
can be called _before_ we've identified the chip. Ensure that sc_chip
is initialized to NULL before chip is identified, and if it is NULL or
ADM1027, use the less-efficient send_byte/receive_byte.
While here, don't attempt to release the i2c bus if we failed to acquire
it. This would cause a panic on a LOCKDEBUG kernel.
Thanks to Nicholas Joly for pointing out both of these bugs.
addresses, rather than trying to read a byte of data from the device.
Some devices don't like to be read from (certain clock devices are, I'm
told, write-only!), while others expect to be asked only for words (or
pairs of bytes).
While here, skip a bunch of i2c addresses that can't (or at the very
least, shouldn't) have any slave devices.
This is the only use in NetBSD of the quick_read/quick_write protocol,
and it remains disabled by default. I've updated all the generic i2c
drivers to handle the quick_* protocols, but several port-specific
drivers have not been updated since I'm in no position to verify that
the changes work. Assistance from sandpoint, arm/xscale, evbarm/gumstix,
mips/alchemy, and macppc would be greatly appreciated.
routine, since we have already have the iic_smbus_* interfaces.
NOTE: i2c controllers that provide their own i2c_exec() routine also need
to be modified. I'll be committing most of these shortly.
1. Trange sysctl's belong to the temp sensors, not to the fan controllers
2. Trange really describes a slope on many chips, so modify the description
3. Most of the sysctl's are read/write even if the chip's config is
locked; reflect that in the CTLFLAGs
4. Apply correct 'nominal' values for voltage sensors/limits, specify
them in microVolts, and calculate once rather than each time needed
5. Be more consistent in register names - for example, use VCC instead of
SUPPLY_VOLTAGE, to match VCC_LOWLIM & VCC_HIGHLIM
6. Type of dbcool_islocked() should be bool, not int
7. Reduce some unnecessary code indentation
8. Define Vtt and Imon, and add ADT7490 support (excluding PECI sensors)
9. Split the huge (250+ lines) dbcool_setup() function into a few smaller
routines for better readability
10. Update sensor tables for ADT7476 and ADT7468 - these chips have five
voltage sensors, not two
11. Adjust flags for ADT7463 and ADM1027 - these chips can monitor CPU
VID data bits
12. Update man page
Supported chips: ADM1027, ADM1030, ADT7463, ADT7466, ADT7467, ADT7468,
ADT7473, ADT7475, and ADT7476. Notably missing is the ADT7490, and fan
controller support on the ADT7466 is still on the to-do list.
Tested by myself and njoly@
Reviewed by garbled@
Commit approved by christos@, bouyer@, cube@, and matt@
i2c Alert Response Address. Skipping this won't hurt (the address is
allegedly reserved), and it might avoid the lock-ups that have been
seen by others.
1. Use proper CRc check for FB-DIMMs rather than simple checksum
2. Provide access to entire SPD ROM contents via sysctl, rather than
only the first 64 bytes
3. Use macros to define i2c bus address checking
4. General fix-up for RAMBUS memory (not that anyone I know has one)
OK garbled@
with other drivers (notably adt7463).
NOTE: The verify routine in _both_ drivers might better be placed in-line
in the _match() routine. But these drivers will soon be superseded by the
dbcool driver any way.
OK gmcgarry@
regardless of DIR() on the formal I2C hardware implementation)
during DIR() is set to INPUT. Some MD drivers might assume it.
tl(4) still works with this change.
- don't set DIR(INPUT) in i2c_wait_for_scl() because it could cause
unexpected stop condition in SCL=H, SDL=L and DIR(OUTPUT) case,
and DIR() should be used only to switch SDA direction, not SCL
that is always output on the master device
(I'm not sure if reading SCL on the master is defined in the I2C spec)
- set SDA right after SCL H->L edge on Tx, fetch SDA at SCL L->H edge on Rx,
and make sure not to change SDA during SCL=H except start/stop conditions
so that we don't have to rely on data setup time which might be critical
- don't set DIR(OUTPUT) during SDA bit read in i2c_bitbang_read_byte()
- explicitly specify both SDA and SCL bits in SETBITS() for readability
- sprinkle comments
Fixes "tl0: error reading Ethernet address" problem on tl(4).