blob: 003c7319b8c7a6dbae0881ae513474eea86f727b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001This is an explanation of what i2c is, and what is supported in this package.
2
3I2C and SMBus
4=============
5
6I2C (pronounce: I squared C) is a protocol developed by Philips. It is a
David Brownell4298cfc2007-05-01 23:26:31 +02007slow two-wire protocol (variable speed, up to 400 kHz), with a high speed
8extension (3.4 MHz). It provides an inexpensive bus for connecting many
9types of devices with infrequent or low bandwidth communications needs.
10I2C is widely used with embedded systems. Some systems use variants that
11don't meet branding requirements, and so are not advertised as being I2C.
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
David Brownell4298cfc2007-05-01 23:26:31 +020013SMBus (System Management Bus) is based on the I2C protocol, and is mostly
14a subset of I2C protocols and signaling. Many I2C devices will work on an
15SMBus, but some SMBus protocols add semantics beyond what is required to
16achieve I2C branding. Modern PC mainboards rely on SMBus. The most common
17devices connected through SMBus are RAM modules configured using I2C EEPROMs,
18and hardware monitoring chips.
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
David Brownell4298cfc2007-05-01 23:26:31 +020020Because the SMBus is mostly a subset of the generalized I2C bus, we can
21use its protocols on many I2C systems. However, there are systems that don't
22meet both SMBus and I2C electrical constraints; and others which can't
23implement all the common SMBus protocol semantics or messages.
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
25
26Terminology
27===========
28
29When we talk about I2C, we use the following terms:
30 Bus -> Algorithm
31 Adapter
32 Device -> Driver
33 Client
34
35An Algorithm driver contains general code that can be used for a whole class
36of I2C adapters. Each specific adapter driver depends on one algorithm
37driver.
David Brownell4298cfc2007-05-01 23:26:31 +020038
Linus Torvalds1da177e2005-04-16 15:20:36 -070039A Driver driver (yes, this sounds ridiculous, sorry) contains the general
40code to access some type of device. Each detected device gets its own
41data in the Client structure. Usually, Driver and Client are more closely
42integrated than Algorithm and Adapter.
43
44For a given configuration, you will need a driver for your I2C bus (usually
45a separate Adapter and Algorithm driver), and drivers for your I2C devices
46(usually one driver for each device). There are no I2C device drivers
47in this package. See the lm_sensors project http://www.lm-sensors.nu
48for device drivers.
49
David Brownell4298cfc2007-05-01 23:26:31 +020050At this time, Linux only operates I2C (or SMBus) in master mode; you can't
51use these APIs to make a Linux system behave as a slave/device, either to
52speak a custom protocol or to emulate some other device.
53
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
55Included Bus Drivers
56====================
57Note that only stable drivers are patched into the kernel by 'mkpatch'.
58
59
60Base modules
61------------
62
63i2c-core: The basic I2C code, including the /proc/bus/i2c* interface
64i2c-dev: The /dev/i2c-* interface
65i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers
66
67Algorithm drivers
68-----------------
69
Linus Torvalds1da177e2005-04-16 15:20:36 -070070i2c-algo-bit: A bit-banging algorithm
71i2c-algo-pcf: A PCF 8584 style algorithm
72i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT)
73
74Adapter drivers
75---------------
76
77i2c-elektor: Elektor ISA card (uses i2c-algo-pcf)
78i2c-elv: ELV parallel port adapter (uses i2c-algo-bit)
79i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched)
80i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit)
81i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT)
82i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit)
Linus Torvalds1da177e2005-04-16 15:20:36 -070083i2c-velleman: Velleman K8000 parallel port adapter (uses i2c-algo-bit)
84