1SPI_ASYNC(9)            Serial Peripheral Interface (S            SPI_ASYNC(9)
2
3
4

NAME

6       spi_async - asynchronous SPI transfer
7

SYNOPSIS

9       int spi_async(struct spi_device * spi, struct spi_message * message);
10

ARGUMENTS

12       spi
13           device with which data will be exchanged
14
15       message
16           describes the data transfers, including completion callback
17

CONTEXT

19       any (irqs may be blocked, etc)
20

DESCRIPTION

22       This call may be used in_irq and other contexts which can't sleep, as
23       well as from task contexts which can sleep.
24
25       The completion callback is invoked in a context which can't sleep.
26       Before that invocation, the value of message->status is undefined. When
27       the callback is issued, message->status holds either zero (to indicate
28       complete success) or a negative error code. After that callback
29       returns, the driver which issued the transfer request may deallocate
30       the associated memory; it's no longer in use by any SPI core or
31       controller driver code.
32
33       Note that although all messages to a spi_device are handled in FIFO
34       order, messages may go to different devices in other orders. Some
35       device might be higher priority, or have various “hard” access time
36       requirements, for example.
37
38       On detection of any fault during the transfer, processing of the entire
39       message is aborted, and the device is deselected. Until returning from
40       the associated message completion callback, no other spi_message queued
41       to that device will be processed. (This rule applies equally to all the
42       synchronous transfer calls, which are wrappers around this core
43       asynchronous primitive.)
44
46Kernel Hackers Manual 3.10         June 2019                      SPI_ASYNC(9)
Impressum