Skip to content

Commit 20738cb

Browse files
author
Wolfram Sang
committed
docs: i2c: summary: be clearer with 'controller/target' and 'adapter/client' pairs
This not only includes rewording, but also where to put which emphasis on terms in this document. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
1 parent 1e926ea commit 20738cb

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

Documentation/i2c/summary.rst

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,45 @@ implement all the common SMBus protocol semantics or messages.
3131
Terminology
3232
===========
3333

34-
The I2C bus connects one or more *controller* chips and one or more *target*
35-
chips.
36-
34+
The I2C bus connects one or more controller chips and one or more target chips.
3735

3836
.. kernel-figure:: i2c_bus.svg
3937
:alt: Simple I2C bus with one controller and 3 targets
4038

4139
Simple I2C bus
4240

4341
A **controller** chip is a node that starts communications with targets. In the
44-
Linux kernel implementation it is called an **adapter** or bus. Adapter
45-
drivers are in the ``drivers/i2c/busses/`` subdirectory.
42+
Linux kernel implementation it is also called an "adapter" or "bus". Controller
43+
drivers are usually in the ``drivers/i2c/busses/`` subdirectory.
4644

47-
An **algorithm** contains general code that can be used to implement a
48-
whole class of I2C adapters. Each specific adapter driver either depends on
49-
an algorithm driver in the ``drivers/i2c/algos/`` subdirectory, or includes
50-
its own implementation.
45+
An **algorithm** contains general code that can be used to implement a whole
46+
class of I2C controllers. Each specific controller driver either depends on an
47+
algorithm driver in the ``drivers/i2c/algos/`` subdirectory, or includes its
48+
own implementation.
5149

5250
A **target** chip is a node that responds to communications when addressed by a
53-
controller. In the Linux kernel implementation it is called a **client**. While
54-
targets are usually separate external chips, Linux can also act as a target
55-
(needs hardware support) and respond to another controller on the bus. This is
56-
then called a **local target**. In contrast, an external chip is called a
57-
**remote target**.
51+
controller. In the Linux kernel implementation it is also called a "client".
52+
While targets are usually separate external chips, Linux can also act as a
53+
target (needs hardware support) and respond to another controller on the bus.
54+
This is then called a **local target**. In contrast, an external chip is called
55+
a **remote target**.
5856

5957
Target drivers are kept in a directory specific to the feature they provide,
6058
for example ``drivers/gpio/`` for GPIO expanders and ``drivers/media/i2c/`` for
6159
video-related chips.
6260

63-
For the example configuration in figure, you will need a driver for your
64-
I2C adapter, and drivers for your I2C devices (usually one driver for each
65-
device).
61+
For the example configuration in the figure above, you will need one driver for
62+
the I2C controller, and drivers for your I2C targets. Usually one driver for
63+
each target.
64+
65+
Synonyms
66+
--------
67+
68+
As mentioned above, the Linux I2C implementation historically uses the terms
69+
"adapter" for controller and "client" for target. A number of data structures
70+
have these synonyms in their name. So, when discussing implementation details,
71+
you should be aware of these terms as well. The official wording is preferred,
72+
though.
6673

6774
Outdated terminology
6875
--------------------

0 commit comments

Comments
 (0)