'\" t .\" Title: struct i2c_board_info .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: I2C and SMBus Subsystem .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "STRUCT I2C_BOARD_INF" "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" struct_i2c_board_info \- template for device creation .SH "SYNOPSIS" .sp .nf struct i2c_board_info { char type[I2C_NAME_SIZE]; unsigned short flags; unsigned short addr; void * platform_data; struct dev_archdata * archdata; struct device_node * of_node; struct fwnode_handle * fwnode; int irq; }; .fi .SH "MEMBERS" .PP type[I2C_NAME_SIZE] .RS 4 chip type, to initialize i2c_client\&.name .RE .PP flags .RS 4 to initialize i2c_client\&.flags .RE .PP addr .RS 4 stored in i2c_client\&.addr .RE .PP platform_data .RS 4 stored in i2c_client\&.dev\&.platform_data .RE .PP archdata .RS 4 copied into i2c_client\&.dev\&.archdata .RE .PP of_node .RS 4 pointer to OpenFirmware device node .RE .PP fwnode .RS 4 device node supplied by the platform firmware .RE .PP irq .RS 4 stored in i2c_client\&.irq .RE .SH "DESCRIPTION" .PP I2C doesn\*(Aqt actually support hardware probing, although controllers and devices may be able to use I2C_SMBUS_QUICK to tell whether or not there\*(Aqs a device at a given address\&. Drivers commonly need more information than that, such as chip type, configuration, associated IRQ, and so on\&. .PP i2c_board_info is used to build tables of information listing I2C devices that are present\&. This information is used to grow the driver model tree\&. For mainboards this is done statically using \fBi2c_register_board_info\fR; bus numbers identify adapters that aren\*(Aqt yet available\&. For add\-on boards, \fBi2c_new_device\fR does this dynamically with the adapter already known\&. .SH "COPYRIGHT" .br