1STRUCT SPI_BOARD_INF(9) Serial Peripheral Interface (S STRUCT SPI_BOARD_INF(9)
2
3
4

NAME

6       struct_spi_board_info - board-specific template for a SPI device
7

SYNOPSIS

9       struct spi_board_info {
10         char modalias[SPI_NAME_SIZE];
11         const void * platform_data;
12         void * controller_data;
13         int irq;
14         u32 max_speed_hz;
15         u16 bus_num;
16         u16 chip_select;
17         u8 mode;
18       };
19

MEMBERS

21       modalias[SPI_NAME_SIZE]
22           Initializes spi_device.modalias; identifies the driver.
23
24       platform_data
25           Initializes spi_device.platform_data; the particular data stored
26           there is driver-specific.
27
28       controller_data
29           Initializes spi_device.controller_data; some controllers need hints
30           about hardware setup, e.g. for DMA.
31
32       irq
33           Initializes spi_device.irq; depends on how the board is wired.
34
35       max_speed_hz
36           Initializes spi_device.max_speed_hz; based on limits from the chip
37           datasheet and board-specific signal quality issues.
38
39       bus_num
40           Identifies which spi_master parents the spi_device; unused by
41           spi_new_device, and otherwise depends on board wiring.
42
43       chip_select
44           Initializes spi_device.chip_select; depends on how the board is
45           wired.
46
47       mode
48           Initializes spi_device.mode; based on the chip datasheet, board
49           wiring (some devices support both 3WIRE and standard modes), and
50           possibly presence of an inverter in the chipselect path.
51

DESCRIPTION

53       When adding new SPI devices to the device tree, these structures serve
54       as a partial device template. They hold information which can't always
55       be determined by drivers. Information that probe can establish (such as
56       the default transfer wordsize) is not included here.
57
58       These structures are used in two places. Their primary role is to be
59       stored in tables of board-specific device descriptors, which are
60       declared early in board initialization and then used (much later) to
61       populate a controller's device tree after the that controller's driver
62       initializes. A secondary (and atypical) role is as a parameter to
63       spi_new_device call, which happens after those controller drivers are
64       active in some dynamic board configuration models.
65
67Kernel Hackers Manual 2.6.       November 2011         STRUCT SPI_BOARD_INF(9)
Impressum