1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct i2c_adapter_quirks</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-bus-recovery-info.html" title="struct i2c_bus_recovery_info"><link rel="next" href="API-module-i2c-driver.html" title="module_i2c_driver"></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_adapter_quirks</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-i2c-bus-recovery-info.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-module-i2c-driver.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-i2c-adapter-quirks"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct i2c_adapter_quirks — 2 describe flaws of an i2c adapter 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct i2c_adapter_quirks { 5 u64 flags; 6 int max_num_msgs; 7 u16 max_write_len; 8 u16 max_read_len; 9 u16 max_comb_1st_msg_len; 10 u16 max_comb_2nd_msg_len; 11}; </pre></div><div class="refsect1"><a name="idp1115300660"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">flags</span></dt><dd><p> 12 see I2C_AQ_* for possible flags and read below 13 </p></dd><dt><span class="term">max_num_msgs</span></dt><dd><p> 14 maximum number of messages per transfer 15 </p></dd><dt><span class="term">max_write_len</span></dt><dd><p> 16 maximum length of a write message 17 </p></dd><dt><span class="term">max_read_len</span></dt><dd><p> 18 maximum length of a read message 19 </p></dd><dt><span class="term">max_comb_1st_msg_len</span></dt><dd><p> 20 maximum length of the first msg in a combined message 21 </p></dd><dt><span class="term">max_comb_2nd_msg_len</span></dt><dd><p> 22 maximum length of the second msg in a combined message 23 </p></dd></dl></div></div><div class="refsect1"><a name="idp1115305612"></a><h2>Note about combined messages</h2><p> 24 Some I2C controllers can only send one message 25 per transfer, plus something called combined message or write-then-read. 26 This is (usually) a small write message followed by a read message and 27 barely enough to access register based devices like EEPROMs. There is a flag 28 to support this mode. It implies max_num_msg = 2 and does the length checks 29 with max_comb_*_len because combined message mode usually has its own 30 limitations. Because of HW implementations, some controllers can actually do 31 write-then-anything or other variants. To support that, write-then-read has 32 been broken out into smaller bits like write-first and read-second which can 33 be combined as needed. 34</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-bus-recovery-info.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-module-i2c-driver.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct i2c_bus_recovery_info</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">module_i2c_driver</span></td></tr></table></div></body></html> 35