'\" t .\" Title: i2c_add_numbered_adapter .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: I2C and SMBus Subsystem .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "I2C_ADD_NUMBERED_ADA" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "I2C and SMBus Subsystem" .\" ----------------------------------------------------------------- .\" * 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" i2c_add_numbered_adapter \- declare i2c adapter, use static bus number .SH "SYNOPSIS" .HP \w'int\ i2c_add_numbered_adapter('u .BI "int i2c_add_numbered_adapter(struct\ i2c_adapter\ *\ " "adap" ");" .SH "ARGUMENTS" .PP \fIadap\fR .RS 4 the adapter to register (with adap\->nr initialized) .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP This routine is used to declare an I2C adapter when its bus number matters\&. For example, use it for I2C adapters from system\-on\-chip CPUs, or otherwise built in to the system\*(Aqs mainboard, and where i2c_board_info is used to properly configure I2C devices\&. .PP If the requested bus number is set to \-1, then this function will behave identically to i2c_add_adapter, and will dynamically assign a bus number\&. .PP If no devices have pre\-been declared for this bus, then be sure to register the adapter before any dynamically allocated ones\&. Otherwise the required bus ID may not be available\&. .PP When this returns zero, the specified adapter became available for clients using the bus number provided in adap\->nr\&. Also, the table of I2C devices pre\-declared using \fBi2c_register_board_info\fR is scanned, and the appropriate driver model device nodes are created\&. Otherwise, a negative errno value is returned\&. .SH "COPYRIGHT" .br