|Version 5 (modified by khali, 7 years ago)|
lm_sensors and i2c Documentation
The picture on the right shows the interrelationships of our kernel drivers. The drivers at the top of the kernel section are "chip" drivers for specific sensors. In the middle is i2c-core, which contains the i2c and smbus protocol implementation. At the bottom of the kernel section are the algorithm and adapter drivers, which comprise the "bus" drivers for accessing the i2c bus (algorithm and adapter drivers are generally combined, except for "bit banging" drivers which use a common algorithm).
The "program" section at the top represents the lm_sensors userspace programs, including "sensors", "sensors-detect", "i2cdetect", and "isadump".
As you can see from the diagram, this is only a small part of a working lm_sensors installation. The rest of the work is done inside the kernel by two branches of lm_sensors that work together, one is called sensors while the other is i2c. You will need both in order to fully utilize lm_sensors. Depending on what kernel you are using (or more specifically what kernel your distribution has provided to you) will determine what lm_sensors is capable of doing. If you find that you cannot address all of the sensor chips you have or maybe you can't even get i2cdetect to see your adapter chip then you should check to see if lm_sensors supports your hardware on our Supported Devices Page.
A note about algorithm and adapter code: Most code for algorithm and adapters are combined into the one module as you need both in order to be able to function correctly. There are a some of exceptions to this, including "bit-banging" adapters which use the separate i2c-algo-bit algorithm, and parallel port adapters, which also use separate algorithm modules.
The following sections link to most of our documentation.
- New Drivers (and yet-to-be-supported devices)
Help / Support
- /etc/sensors.conf help (top of the sensors.conf.eg file)
- 2.6 Kernel Information Page -- Up-to-date information on compatibility and support of lm-sensors in 2.6 kernels.
- New Drivers Page -- Generally up-to-date information
- Latest lm_sensors CHANGES document from Subversion repository
- Latest i2c CHANGES document from Subversion repository
- I2C TODO list -- includes plans regarding SMBus 2.0 and 16-bit register addresses
- Information for IBM Thinkpad owners about eeprom corruption by lm_sensors
- Protocol Implementation Status Page -- Status of support for all I2C, SMBus and SMBus 2.0 messages in the i2c package; includes information on PEC, I2C block, and 2-byte I2C addresses.
- Overview of programs and tools in the lm_sensors package
- eeprom (small eeprom reader/writer)
- eepromer (large eeprom reader/writer)
- Init scripts (for use at kernel startup)
- m7101 (ALi chip hotplug module)
- mkpatch (kernel patch generator)
- p4b_smbus (Asus P4B PIIX4 SMBus function hotplug module)
- RRD scripts (generates web plots)
- sensord (sensor daemon)
- tellerstats (generates web plots)
Theory of operation
- Overview for Applications Developers -- How to use i2c, lm_sensors, and libsensors in your application
- Protocol Implementation Status Page -- Status of support for all I2C, SMBus and SMBus 2.0 messages in the i2c package. Includes information on PEC, I2C block, and 2-byte I2C addresses.
- How to write new Drivers -- Checklist for both sensors and bus drivers
- How to write I2C Drivers -- details for i2c bus drivers
- How to port I2C Drivers from the i2c-old interface to the standard I2C interface (Kernel 2.5 removed i2c-old, use this guide to port your driver!)
- New Drivers Page -- Check here before starting a driver.
- Datasheet directory? (not up-to-date)