---
name: "spi_register_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/spi_register_board_info"
---

# spi\_register\_board\_info(9)

register SPI devices for a given board

## NAME

spi\_register\_board\_info - register SPI devices for a given board

## SYNOPSIS

**int spi\_register\_board\_info(struct spi\_board\_info const \*** *info***, unsigned** *n***);**

## ARGUMENTS

*info*

array of chip descriptors

*n*

how many descriptors are provided

## CONTEXT

can sleep

## DESCRIPTION

Board-specific early init code calls this (probably during arch\_initcall) with segments of the SPI device table. Any device nodes are created later, after the relevant parent SPI controller (bus\_num) is defined. We keep this table of devices forever, so that reloading a controller driver will not make Linux forget about these hard-wired devices.

Other code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices.

The board info passed can safely be \_\_initdata ... but be careful of any embedded pointers (platform\_data, etc), they're copied as-is.

## COPYRIGHT
