0001 I\ :sup:`2`\ C and SMBus Subsystem
0002 ==================================
0003
0004 I\ :sup:`2`\ C (or without fancy typography, "I2C") is an acronym for
0005 the "Inter-IC" bus, a simple bus protocol which is widely used where low
0006 data rate communications suffice. Since it's also a licensed trademark,
0007 some vendors use another name (such as "Two-Wire Interface", TWI) for
0008 the same bus. I2C only needs two signals (SCL for clock, SDA for data),
0009 conserving board real estate and minimizing signal quality issues. Most
0010 I2C devices use seven bit addresses, and bus speeds of up to 400 kHz;
0011 there's a high speed extension (3.4 MHz) that's not yet found wide use.
0012 I2C is a multi-master bus; open drain signaling is used to arbitrate
0013 between masters, as well as to handshake and to synchronize clocks from
0014 slower clients.
0015
0016 The Linux I2C programming interfaces support the master side of bus
0017 interactions and the slave side. The programming interface is
0018 structured around two kinds of driver, and two kinds of device. An I2C
0019 "Adapter Driver" abstracts the controller hardware; it binds to a
0020 physical device (perhaps a PCI device or platform_device) and exposes a
0021 :c:type:`struct i2c_adapter <i2c_adapter>` representing each
0022 I2C bus segment it manages. On each I2C bus segment will be I2C devices
0023 represented by a :c:type:`struct i2c_client <i2c_client>`.
0024 Those devices will be bound to a :c:type:`struct i2c_driver
0025 <i2c_driver>`, which should follow the standard Linux driver model. There
0026 are functions to perform various I2C protocol operations; at this writing
0027 all such functions are usable only from task context.
0028
0029 The System Management Bus (SMBus) is a sibling protocol. Most SMBus
0030 systems are also I2C conformant. The electrical constraints are tighter
0031 for SMBus, and it standardizes particular protocol messages and idioms.
0032 Controllers that support I2C can also support most SMBus operations, but
0033 SMBus controllers don't support all the protocol options that an I2C
0034 controller will. There are functions to perform various SMBus protocol
0035 operations, either using I2C primitives or by issuing SMBus commands to
0036 i2c_adapter devices which don't support those I2C operations.
0037
0038 .. kernel-doc:: include/linux/i2c.h
0039 :internal:
0040
0041 .. kernel-doc:: drivers/i2c/i2c-boardinfo.c
0042 :functions: i2c_register_board_info
0043
0044 .. kernel-doc:: drivers/i2c/i2c-core-base.c
0045 :export:
0046
0047 .. kernel-doc:: drivers/i2c/i2c-core-smbus.c
0048 :export: