1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct i2c_board_info</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="i2c.html" title="Chapter 10. I2C and SMBus Subsystem"><link rel="prev" href="API-struct-i2c-client.html" title="struct i2c_client"><link rel="next" href="API-I2C-BOARD-INFO.html" title="I2C_BOARD_INFO"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct i2c_board_info</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-i2c-client.html">Prev</a> </td><th width="60%" align="center">Chapter 10. I<sup>2</sup>C and SMBus Subsystem</th><td width="20%" align="right"> <a accesskey="n" href="API-I2C-BOARD-INFO.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-i2c-board-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct i2c_board_info — 2 template for device creation 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct i2c_board_info { 5 char type[I2C_NAME_SIZE]; 6 unsigned short flags; 7 unsigned short addr; 8 void * platform_data; 9 struct dev_archdata * archdata; 10 struct device_node * of_node; 11 struct fwnode_handle * fwnode; 12 int irq; 13}; </pre></div><div class="refsect1"><a name="idp1115257028"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">type[I2C_NAME_SIZE]</span></dt><dd><p> 14 chip type, to initialize i2c_client.name 15 </p></dd><dt><span class="term">flags</span></dt><dd><p> 16 to initialize i2c_client.flags 17 </p></dd><dt><span class="term">addr</span></dt><dd><p> 18 stored in i2c_client.addr 19 </p></dd><dt><span class="term">platform_data</span></dt><dd><p> 20 stored in i2c_client.dev.platform_data 21 </p></dd><dt><span class="term">archdata</span></dt><dd><p> 22 copied into i2c_client.dev.archdata 23 </p></dd><dt><span class="term">of_node</span></dt><dd><p> 24 pointer to OpenFirmware device node 25 </p></dd><dt><span class="term">fwnode</span></dt><dd><p> 26 device node supplied by the platform firmware 27 </p></dd><dt><span class="term">irq</span></dt><dd><p> 28 stored in i2c_client.irq 29 </p></dd></dl></div></div><div class="refsect1"><a name="idp1115263292"></a><h2>Description</h2><p> 30 I2C doesn't actually support hardware probing, although controllers and 31 devices may be able to use I2C_SMBUS_QUICK to tell whether or not there's 32 a device at a given address. Drivers commonly need more information than 33 that, such as chip type, configuration, associated IRQ, and so on. 34 </p><p> 35 36 i2c_board_info is used to build tables of information listing I2C devices 37 that are present. This information is used to grow the driver model tree. 38 For mainboards this is done statically using <code class="function">i2c_register_board_info</code>; 39 bus numbers identify adapters that aren't yet available. For add-on boards, 40 <code class="function">i2c_new_device</code> does this dynamically with the adapter already known. 41</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-i2c-client.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="i2c.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-I2C-BOARD-INFO.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct i2c_client</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">I2C_BOARD_INFO</span></td></tr></table></div></body></html> 42