---
name: "struct_spi_board_info"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/struct_spi_board_info"
---

# struct\_spi\_board\_info(9)

board-specific template for a SPI device

## NAME

struct\_spi\_board\_info - board-specific template for a SPI device

## SYNOPSIS

```
struct spi_board_info {
  char modalias[SPI_NAME_SIZE];
  const void * platform_data;
  void * controller_data;
  int irq;
  u32 max_speed_hz;
  u16 bus_num;
  u16 chip_select;
  u16 mode;
};
```

## MEMBERS

modalias\[SPI\_NAME\_SIZE\]

Initializes spi\_device.modalias; identifies the driver.

platform\_data

Initializes spi\_device.platform\_data; the particular data stored there is driver-specific.

controller\_data

Initializes spi\_device.controller\_data; some controllers need hints about hardware setup, e.g. for DMA.

irq

Initializes spi\_device.irq; depends on how the board is wired.

max\_speed\_hz

Initializes spi\_device.max\_speed\_hz; based on limits from the chip datasheet and board-specific signal quality issues.

bus\_num

Identifies which spi\_master parents the spi\_device; unused by **spi\_new\_device**, and otherwise depends on board wiring.

chip\_select

Initializes spi\_device.chip\_select; depends on how the board is wired.

mode

Initializes spi\_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.

## DESCRIPTION

When adding new SPI devices to the device tree, these structures serve as a partial device template. They hold information which can't always be determined by drivers. Information that **probe** can establish (such as the default transfer wordsize) is not included here.

These structures are used in two places. Their primary role is to be stored in tables of board-specific device descriptors, which are declared early in board initialization and then used (much later) to populate a controller's device tree after the that controller's driver initializes. A secondary (and atypical) role is as a parameter to **spi\_new\_device** call, which happens after those controller drivers are active in some dynamic board configuration models.

## COPYRIGHT
