summaryrefslogtreecommitdiff
path: root/Documentation/i2c/summary.rst
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2020-01-29 16:19:28 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-01-29 22:01:16 +0100
commit020bc5b9296af6d3e0b255cff3a2674191287624 (patch)
tree532c45763da7d0cf515c48ef07dbe295c562a061 /Documentation/i2c/summary.rst
parent096c22f88ea09dab449f039863a46cb504b9b3ec (diff)
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: Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'Documentation/i2c/summary.rst')
-rw-r--r--Documentation/i2c/summary.rst36
1 files changed, 22 insertions, 14 deletions
diff --git a/Documentation/i2c/summary.rst b/Documentation/i2c/summary.rst
index dbab737d5075..09f73a608e25 100644
--- a/Documentation/i2c/summary.rst
+++ b/Documentation/i2c/summary.rst
@@ -31,21 +31,29 @@ implement all the common SMBus protocol semantics or messages.
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
- Adapter
- Device -> Driver
- Client
+.. kernel-figure:: i2c.svg
+ :alt: Simple I2C bus with one master and 3 slaves
-An Algorithm driver contains general code that can be used for a whole class
-of I2C adapters. Each specific adapter driver either depends on one algorithm
-driver, or includes its own implementation.
+ Simple I2C bus
-A Driver driver (yes, this sounds ridiculous, sorry) contains the general
-code to access some type of device. Each detected device gets its own
-data in the Client structure. Usually, Driver and Client are more closely
-integrated than Algorithm and Adapter.
+A **master** chip is a node that starts communications with slaves. In the
+Linux kernel implementation it is called an **adapter** or bus. Adapter
+drivers are in the ``drivers/i2c/busses/`` subdirectory.
-For a given configuration, you will need a driver for your I2C bus, and
-drivers for your I2C devices (usually one driver for each device).
+An **algorithm** contains general code that can be used to implement a
+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).