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

NAME

6       spi_alloc_device - Allocate a new SPI device
7

SYNOPSIS

9       struct spi_device * spi_alloc_device(struct spi_master * master);
10

ARGUMENTS

12       master
13           Controller to which device is connected
14

CONTEXT

16       can sleep
17

DESCRIPTION

19       Allows a driver to allocate and initialize a spi_device without
20       registering it immediately. This allows a driver to directly fill the
21       spi_device with device parameters before calling spi_add_device on it.
22
23       Caller is responsible to call spi_add_device on the returned spi_device
24       structure to add it to the SPI master. If the caller needs to discard
25       the spi_device without adding it, then it should call spi_dev_put on
26       it.
27
28       Returns a pointer to the new device, or NULL.
29
31Kernel Hackers Manual 2.6.         June 2019               SPI_ALLOC_DEVICE(9)
Impressum