Commit 020bc5b9 authored by Luca Ceresoli's avatar Luca Ceresoli Committed by Wolfram Sang

docs: i2c: summary: rewrite the "terminology" section

This section, partly dating back to the pre-git era, is somewhat
unclear and partly incorrect. Rewrite it almost completely including a
reference figure, concise but precise definition of each term and the
paths where drivers are found. Particular care has been put in clarifying
the relation between adapter and algorithm, which has no correspondence
in the I2C spec terminology.
Signed-off-by: default avatarLuca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 096c22f8
This diff is collapsed.
...@@ -31,21 +31,29 @@ implement all the common SMBus protocol semantics or messages. ...@@ -31,21 +31,29 @@ implement all the common SMBus protocol semantics or messages.
Terminology Terminology
=========== ===========
When we talk about I2C, we use the following terms:: Using the terminology from the official documentation, the I2C bus connects
one or more *master* chips and one or more *slave* chips.
Bus -> Algorithm .. kernel-figure:: i2c.svg
Adapter :alt: Simple I2C bus with one master and 3 slaves
Device -> Driver
Client
An Algorithm driver contains general code that can be used for a whole class Simple I2C bus
of I2C adapters. Each specific adapter driver either depends on one algorithm
driver, or includes its own implementation.
A Driver driver (yes, this sounds ridiculous, sorry) contains the general A **master** chip is a node that starts communications with slaves. In the
code to access some type of device. Each detected device gets its own Linux kernel implementation it is called an **adapter** or bus. Adapter
data in the Client structure. Usually, Driver and Client are more closely drivers are in the ``drivers/i2c/busses/`` subdirectory.
integrated than Algorithm and Adapter.
For a given configuration, you will need a driver for your I2C bus, and An **algorithm** contains general code that can be used to implement a
drivers for your I2C devices (usually one driver for each device). whole class of I2C adapters. Each specific adapter driver either depends on
an algorithm driver in the ``drivers/i2c/algos/`` subdirectory, or includes
its own implementation.
A **slave** chip is a node that responds to communications when addressed
by the master. In Linux it is called a **client**. Client drivers are kept
in a directory specific to the feature they provide, for example
``drivers/media/gpio/`` for GPIO expanders and ``drivers/media/i2c/`` for
video-related chips.
For the example configuration in figure, you will need a driver for your
I2C adapter, and drivers for your I2C devices (usually one driver for each
device).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment