'\" t .\" Title: i2c_new_dummy .\" 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_NEW_DUMMY" "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_new_dummy \- return a new i2c device bound to a dummy driver .SH "SYNOPSIS" .HP \w'struct\ i2c_client\ *\ i2c_new_dummy('u .BI "struct i2c_client * i2c_new_dummy(struct\ i2c_adapter\ *\ " "adapter" ", u16\ " "address" ");" .SH "ARGUMENTS" .PP \fIadapter\fR .RS 4 the adapter managing the device .RE .PP \fIaddress\fR .RS 4 seven bit address to be used .RE .SH "CONTEXT" .PP can sleep .SH "DESCRIPTION" .PP This returns an I2C client bound to the \(lqdummy\(rq driver, intended for use with devices that consume multiple addresses\&. Examples of such chips include various EEPROMS (like 24c04 and 24c08 models)\&. .PP These dummy devices have two main uses\&. First, most I2C and SMBus calls except \fBi2c_transfer\fR need a client handle; the dummy will be that handle\&. And second, this prevents the specified address from being bound to a different driver\&. .PP This returns the new i2c client, which should be saved for later use with \fBi2c_unregister_device\fR; or NULL to indicate an error\&. .SH "COPYRIGHT" .br