'\" t .\" Title: i2c_new_device .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: I2C and SMBus Subsystem .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "I2C_NEW_DEVICE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_new_device \- instantiate an i2c device .SH "SYNOPSIS" .HP \w'struct\ i2c_client\ *\ i2c_new_device('u .BI "struct i2c_client * i2c_new_device(struct\ i2c_adapter\ *\ " "adap" ", struct\ i2c_board_info\ const\ *\ " "info" ");" .SH "ARGUMENTS" .PP \fIadap\fR .RS 4 the adapter managing the device .RE .PP \fIinfo\fR .RS 4 describes one I2C device; bus_num is ignored .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP Create an i2c device\&. Binding is handled through driver model \fBprobe\fR/\fBremove\fR methods\&. A driver may be bound to this device when we return from this function, or any later moment (e\&.g\&. maybe hotplugging will load the driver module)\&. This call is not appropriate for use by mainboard initialization logic, which usually runs during an \fBarch_initcall\fR long before any i2c_adapter could exist\&. .PP This returns the new i2c client, which may be saved for later use with \fBi2c_unregister_device\fR; or NULL to indicate an error\&. .SH "COPYRIGHT" .br