1<html><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.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="i2c.html" title="Chapter&#160;10.&#160;I2C and SMBus Subsystem"><link rel="prev" href="API-struct-i2c-driver.html" title="struct i2c_driver"><link rel="next" href="API-struct-i2c-board-info.html" title="struct 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_client</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-i2c-driver.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;10.&#160;I<sup>2</sup>C and SMBus Subsystem</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-struct-i2c-board-info.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-i2c-client"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct i2c_client &#8212; 
2     represent an I2C slave device
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct i2c_client {
5  unsigned short flags;
6  unsigned short addr;
7  char name[I2C_NAME_SIZE];
8  struct i2c_adapter * adapter;
9  struct device dev;
10  int irq;
11  struct list_head detected;
12#if IS_ENABLED(CONFIG_I2C_SLAVE)
13  i2c_slave_cb_t slave_cb;
14#endif
15};  </pre></div><div class="refsect1"><a name="idp1115245564"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">flags</span></dt><dd><p>
16   I2C_CLIENT_TEN indicates the device uses a ten bit chip address;
17   I2C_CLIENT_PEC indicates it uses SMBus Packet Error Checking
18      </p></dd><dt><span class="term">addr</span></dt><dd><p>
19   Address used on the I2C bus connected to the parent adapter.
20      </p></dd><dt><span class="term">name[I2C_NAME_SIZE]</span></dt><dd><p>
21   Indicates the type of the device, usually a chip name that's
22   generic enough to hide second-sourcing and compatible revisions.
23      </p></dd><dt><span class="term">adapter</span></dt><dd><p>
24   manages the bus segment hosting this I2C device
25      </p></dd><dt><span class="term">dev</span></dt><dd><p>
26   Driver model device node for the slave.
27      </p></dd><dt><span class="term">irq</span></dt><dd><p>
28   indicates the IRQ generated by this device (if any)
29      </p></dd><dt><span class="term">detected</span></dt><dd><p>
30   member of an i2c_driver.clients list or i2c-core's
31   userspace_devices list
32      </p></dd><dt><span class="term">slave_cb</span></dt><dd><p>
33   Callback when I2C slave mode of an adapter is used. The adapter
34   calls it to pass on slave events to the slave driver.
35      </p></dd></dl></div></div><div class="refsect1"><a name="idp1115252172"></a><h2>Description</h2><p>
36   An i2c_client identifies a single device (i.e. chip) connected to an
37   i2c bus. The behaviour exposed to Linux is defined by the driver
38   managing the device.
39</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-driver.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="i2c.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-struct-i2c-board-info.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct i2c_driver</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">struct i2c_board_info</span></td></tr></table></div></body></html>
40