blob: 3a24eac1737562a17e089ba9f4feafe175a79b13 [file] [log] [blame]
Mauro Carvalho Chehabccf988b2019-07-26 09:51:16 -03001=============
Linus Torvalds1da177e2005-04-16 15:20:36 -07002I2C and SMBus
3=============
4
Mauro Carvalho Chehabccf988b2019-07-26 09:51:16 -03005I2C (pronounce: I squared C) is a protocol developed by Philips. It is a
David Brownell4298cfc2007-05-01 23:26:31 +02006slow two-wire protocol (variable speed, up to 400 kHz), with a high speed
7extension (3.4 MHz). It provides an inexpensive bus for connecting many
8types of devices with infrequent or low bandwidth communications needs.
9I2C is widely used with embedded systems. Some systems use variants that
10don't meet branding requirements, and so are not advertised as being I2C.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
David Brownell4298cfc2007-05-01 23:26:31 +020012SMBus (System Management Bus) is based on the I2C protocol, and is mostly
13a subset of I2C protocols and signaling. Many I2C devices will work on an
14SMBus, but some SMBus protocols add semantics beyond what is required to
15achieve I2C branding. Modern PC mainboards rely on SMBus. The most common
16devices connected through SMBus are RAM modules configured using I2C EEPROMs,
17and hardware monitoring chips.
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
David Brownell4298cfc2007-05-01 23:26:31 +020019Because the SMBus is mostly a subset of the generalized I2C bus, we can
20use its protocols on many I2C systems. However, there are systems that don't
21meet both SMBus and I2C electrical constraints; and others which can't
22implement all the common SMBus protocol semantics or messages.
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24
25Terminology
26===========
27
Mauro Carvalho Chehabccf988b2019-07-26 09:51:16 -030028When we talk about I2C, we use the following terms::
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030 Bus -> Algorithm
31 Adapter
32 Device -> Driver
33 Client
34
35An Algorithm driver contains general code that can be used for a whole class
Jean Delvare45ccc6c2007-12-12 13:45:24 +010036of I2C adapters. Each specific adapter driver either depends on one algorithm
37driver, or includes its own implementation.
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
Jean Delvare45ccc6c2007-12-12 13:45:24 +010044For a given configuration, you will need a driver for your I2C bus, and
45drivers for your I2C devices (usually one driver for each device).