'\" t .\" Title: spi_register_board_info .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Serial Peripheral Interface (SPI) .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SPI_REGISTER_BOARD_I" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Serial Peripheral Interface (S" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" spi_register_board_info \- register SPI devices for a given board .SH "SYNOPSIS" .HP \w'int\ spi_register_board_info('u .BI "int spi_register_board_info(struct\ spi_board_info\ const\ *\ " "info" ", unsigned\ " "n" ");" .SH "ARGUMENTS" .PP \fIinfo\fR .RS 4 array of chip descriptors .RE .PP \fIn\fR .RS 4 how many descriptors are provided .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP 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\&. .PP 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\&. .PP The board info passed can safely be __initdata \&.\&.\&. but be careful of any embedded pointers (platform_data, etc), they\*(Aqre copied as\-is\&. .SH "RETURN" .PP zero on success, else a negative error code\&. .SH "COPYRIGHT" .br