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

NAME

6       spi_async_locked - version of spi_async with exclusive bus usage
7

SYNOPSIS

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

ARGUMENTS

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

CONTEXT

20       any (irqs may be blocked, etc)
21

DESCRIPTION

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