1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct i2c_bus_recovery_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&#160;10.&#160;I2C and SMBus Subsystem"><link rel="prev" href="API-struct-i2c-algorithm.html" title="struct i2c_algorithm"><link rel="next" href="API-struct-i2c-adapter-quirks.html" title="struct i2c_adapter_quirks"></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_bus_recovery_info</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-i2c-algorithm.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-adapter-quirks.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-i2c-bus-recovery-info"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct i2c_bus_recovery_info &#8212; 
2     I2C bus recovery information
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct i2c_bus_recovery_info {
5  int (* recover_bus) (struct i2c_adapter *);
6  int (* get_scl) (struct i2c_adapter *);
7  void (* set_scl) (struct i2c_adapter *, int val);
8  int (* get_sda) (struct i2c_adapter *);
9  void (* prepare_recovery) (struct i2c_adapter *);
10  void (* unprepare_recovery) (struct i2c_adapter *);
11  int scl_gpio;
12  int sda_gpio;
13};  </pre></div><div class="refsect1"><a name="idp1115288676"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">recover_bus</span></dt><dd><p>
14   Recover routine. Either pass driver's <code class="function">recover_bus</code> routine, or
15   <code class="function">i2c_generic_scl_recovery</code> or <code class="function">i2c_generic_gpio_recovery</code>.
16      </p></dd><dt><span class="term">get_scl</span></dt><dd><p>
17   This gets current value of SCL line. Mandatory for generic SCL
18   recovery. Used internally for generic GPIO recovery.
19      </p></dd><dt><span class="term">set_scl</span></dt><dd><p>
20   This sets/clears SCL line. Mandatory for generic SCL recovery. Used
21   internally for generic GPIO recovery.
22      </p></dd><dt><span class="term">get_sda</span></dt><dd><p>
23   This gets current value of SDA line. Optional for generic SCL
24   recovery. Used internally, if sda_gpio is a valid GPIO, for generic GPIO
25   recovery.
26      </p></dd><dt><span class="term">prepare_recovery</span></dt><dd><p>
27   This will be called before starting recovery. Platform may
28   configure padmux here for SDA/SCL line or something else they want.
29      </p></dd><dt><span class="term">unprepare_recovery</span></dt><dd><p>
30   This will be called after completing recovery. Platform
31   may configure padmux here for SDA/SCL line or something else they want.
32      </p></dd><dt><span class="term">scl_gpio</span></dt><dd><p>
33   gpio number of the SCL line. Only required for GPIO recovery.
34      </p></dd><dt><span class="term">sda_gpio</span></dt><dd><p>
35   gpio number of the SDA line. Only required for GPIO recovery.
36      </p></dd></dl></div></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-algorithm.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-adapter-quirks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct i2c_algorithm</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_adapter_quirks</span></td></tr></table></div></body></html>
37