@@ -19,14 +19,14 @@ commonly used. Each clock cycle shifts data out and data in; the clock
19
19
doesn't cycle except when there is a data bit to shift. Not all data bits
20
20
are used though; not every protocol uses those full duplex capabilities.
21
21
22
- SPI hosts use a fourth "chip select" line to activate a given SPI slave
22
+ SPI hosts use a fourth "chip select" line to activate a given SPI target
23
23
device, so those three signal wires may be connected to several chips
24
- in parallel. All SPI slaves support chipselects; they are usually active
25
- low signals, labeled nCSx for slave 'x' (e.g. nCS0). Some devices have
24
+ in parallel. All SPI targets support chipselects; they are usually active
25
+ low signals, labeled nCSx for target 'x' (e.g. nCS0). Some devices have
26
26
other signals, often including an interrupt to the host.
27
27
28
28
Unlike serial busses like USB or SMBus, even low level protocols for
29
- SPI slave functions are usually not interoperable between vendors
29
+ SPI target functions are usually not interoperable between vendors
30
30
(except for commodities like SPI memory chips).
31
31
32
32
- SPI may be used for request/response style device protocols, as with
@@ -43,8 +43,8 @@ SPI slave functions are usually not interoperable between vendors
43
43
44
44
- Sometimes SPI is used to daisy-chain devices, like shift registers.
45
45
46
- In the same way, SPI slaves will only rarely support any kind of automatic
47
- discovery/enumeration protocol. The tree of slave devices accessible from
46
+ In the same way, SPI targets will only rarely support any kind of automatic
47
+ discovery/enumeration protocol. The tree of target devices accessible from
48
48
a given SPI host controller will normally be set up manually, with
49
49
configuration tables.
50
50
@@ -75,7 +75,7 @@ protocol supported by every MMC or SD memory card. (The older "DataFlash"
75
75
cards, predating MMC cards but using the same connectors and card shape,
76
76
support only SPI.) Some PC hardware uses SPI flash for BIOS code.
77
77
78
- SPI slave chips range from digital/analog converters used for analog
78
+ SPI target chips range from digital/analog converters used for analog
79
79
sensors and codecs, to memory, to peripherals like USB controllers
80
80
or Ethernet adapters; and more.
81
81
@@ -119,7 +119,7 @@ trailing clock edge (CPHA=1), that's SPI mode 1.
119
119
120
120
Note that the clock mode is relevant as soon as the chipselect goes
121
121
active. So the host must set the clock to inactive before selecting
122
- a slave , and the slave can tell the chosen polarity by sampling the
122
+ a target , and the target can tell the chosen polarity by sampling the
123
123
clock level when its select line goes active. That's why many devices
124
124
support for example both modes 0 and 3: they don't care about polarity,
125
125
and always clock data in/out on rising clock edges.
@@ -142,13 +142,13 @@ There are two types of SPI driver, here called:
142
142
143
143
Controller drivers ...
144
144
controllers may be built into System-On-Chip
145
- processors, and often support both Master and Slave roles.
145
+ processors, and often support both Controller and target roles.
146
146
These drivers touch hardware registers and may use DMA.
147
147
Or they can be PIO bitbangers, needing just GPIO pins.
148
148
149
149
Protocol drivers ...
150
150
these pass messages through the controller
151
- driver to communicate with a Slave or Master device on the
151
+ driver to communicate with a target or Controller device on the
152
152
other side of an SPI link.
153
153
154
154
So for example one protocol driver might talk to the MTD layer to export
@@ -184,17 +184,17 @@ shows up in sysfs in several locations::
184
184
MOSI, and MISO.
185
185
186
186
/sys/devices/.../CTLR/slave ... virtual file for (un)registering the
187
- slave device for an SPI slave controller.
188
- Writing the driver name of an SPI slave handler to this file
189
- registers the slave device; writing "(null)" unregisters the slave
187
+ target device for an SPI target controller.
188
+ Writing the driver name of an SPI target handler to this file
189
+ registers the target device; writing "(null)" unregisters the target
190
190
device.
191
- Reading from this file shows the name of the slave device ("(null)"
191
+ Reading from this file shows the name of the target device ("(null)"
192
192
if not registered).
193
193
194
194
/sys/class/spi_slave/spiB ... symlink to a logical node which could hold
195
- class related state for the SPI slave controller on bus "B". When
195
+ class related state for the SPI target controller on bus "B". When
196
196
registered, a single spiB.* device is present here, possible sharing
197
- the physical SPI bus segment with other SPI slave devices.
197
+ the physical SPI bus segment with other SPI target devices.
198
198
199
199
At this time, the only class-specific state is the bus number ("B" in "spiB"),
200
200
so those /sys/class entries are only useful to quickly identify busses.
@@ -270,10 +270,10 @@ same SOC controller is used. For example, on one board SPI might use
270
270
an external clock, where another derives the SPI clock from current
271
271
settings of some master clock.
272
272
273
- Declare Slave Devices
273
+ Declare target Devices
274
274
^^^^^^^^^^^^^^^^^^^^^
275
275
276
- The second kind of information is a list of what SPI slave devices exist
276
+ The second kind of information is a list of what SPI target devices exist
277
277
on the target board, often with some board-specific data needed for the
278
278
driver to work correctly.
279
279
@@ -469,7 +469,7 @@ routines are available to allocate and zero-initialize an spi_message
469
469
with several transfers.
470
470
471
471
472
- How do I write an "SPI Master Controller Driver"?
472
+ How do I write an "SPI Controller Driver"?
473
473
-------------------------------------------------
474
474
An SPI controller will probably be registered on the platform_bus; write
475
475
a driver to bind to the device, whichever bus is involved.
@@ -527,7 +527,7 @@ SPI Host Controller Methods
527
527
Drivers may change the defaults provided by board_info, and then
528
528
call spi_setup(spi) to invoke this routine. It may sleep.
529
529
530
- Unless each SPI slave has its own configuration registers, don't
530
+ Unless each SPI target has its own configuration registers, don't
531
531
change them right away ... otherwise drivers could corrupt I/O
532
532
that's in progress for other SPI devices.
533
533
0 commit comments