<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>struct i2c_client</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch10.html" title="Chapter 10. I2C and SMBus Subsystem" /><link rel="prev" href="re754.html" title="struct i2c_driver" /><link rel="next" href="re756.html" title="struct i2c_board_info" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct i2c_client</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re754.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="re756.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct i2c_client"><a id="API-struct-i2c-client"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct i2c_client — represent an I2C slave device </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting"> struct i2c_client { unsigned short flags; unsigned short addr; char name[I2C_NAME_SIZE]; struct i2c_adapter * adapter; struct i2c_driver * driver; struct device dev; int irq; struct list_head detected; }; </pre></div><div class="refsect1" title="Members"><a id="id2708603"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">flags</span></dt><dd><p> I2C_CLIENT_TEN indicates the device uses a ten bit chip address; I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking </p></dd><dt><span class="term">addr</span></dt><dd><p> Address used on the I2C bus connected to the parent adapter. </p></dd><dt><span class="term">name[I2C_NAME_SIZE]</span></dt><dd><p> Indicates the type of the device, usually a chip name that's generic enough to hide second-sourcing and compatible revisions. </p></dd><dt><span class="term">adapter</span></dt><dd><p> manages the bus segment hosting this I2C device </p></dd><dt><span class="term">driver</span></dt><dd><p> device's driver, hence pointer to access routines </p></dd><dt><span class="term">dev</span></dt><dd><p> Driver model device node for the slave. </p></dd><dt><span class="term">irq</span></dt><dd><p> indicates the IRQ generated by this device (if any) </p></dd><dt><span class="term">detected</span></dt><dd><p> member of an i2c_driver.clients list or i2c-core's userspace_devices list </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2708712"></a><h2>Description</h2><p> An i2c_client identifies a single device (i.e. chip) connected to an i2c bus. The behaviour exposed to Linux is defined by the driver managing the device. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re754.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch10.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re756.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct i2c_driver</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>struct i2c_board_info</span></td></tr></table></div></body></html>