1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct drm_dp_aux</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux DRM Developer's Guide"><link rel="up" href="ch02s05.html#idp1125808116" title="Display Port Helper Functions Reference"><link rel="prev" href="API-struct-drm-dp-aux-msg.html" title="struct drm_dp_aux_msg"><link rel="next" href="API-drm-dp-dpcd-readb.html" title="drm_dp_dpcd_readb"></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 drm_dp_aux</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-drm-dp-aux-msg.html">Prev</a>&#160;</td><th width="60%" align="center">Display Port Helper Functions Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-drm-dp-dpcd-readb.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-drm-dp-aux"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct drm_dp_aux &#8212; 
2     DisplayPort AUX channel
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct drm_dp_aux {
5  const char * name;
6  struct i2c_adapter ddc;
7  struct device * dev;
8  struct mutex hw_mutex;
9  ssize_t (* transfer) (struct drm_dp_aux *aux,struct drm_dp_aux_msg *msg);
10};  </pre></div><div class="refsect1"><a name="idp1125822796"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">name</span></dt><dd><p>
11   user-visible name of this AUX channel and the I2C-over-AUX adapter
12      </p></dd><dt><span class="term">ddc</span></dt><dd><p>
13   I2C adapter that can be used for I2C-over-AUX communication
14      </p></dd><dt><span class="term">dev</span></dt><dd><p>
15   pointer to struct device that is the parent for this AUX channel
16      </p></dd><dt><span class="term">hw_mutex</span></dt><dd><p>
17   internal mutex used for locking transfers
18      </p></dd><dt><span class="term">transfer</span></dt><dd><p>
19   transfers a message representing a single AUX transaction
20      </p></dd></dl></div></div><div class="refsect1"><a name="idp1125827028"></a><h2>Description</h2><p>
21   The .dev field should be set to a pointer to the device that implements
22   the AUX channel.
23   </p><p>
24
25   The .name field may be used to specify the name of the I2C adapter. If set to
26   NULL, <code class="function">dev_name</code> of .dev will be used.
27   </p><p>
28
29   Drivers provide a hardware-specific implementation of how transactions
30   are executed via the .<code class="function">transfer</code> function. A pointer to a drm_dp_aux_msg
31   structure describing the transaction is passed into this function. Upon
32   success, the implementation should return the number of payload bytes
33   that were transferred, or a negative error-code on failure. Helpers
34   propagate errors from the .<code class="function">transfer</code> function, with the exception of
35   the -EBUSY error, which causes a transaction to be retried. On a short,
36   helpers will return -EPROTO to make it simpler to check for failure.
37   </p><p>
38
39   An AUX channel can also be used to transport I2C messages to a sink. A
40   typical application of that is to access an EDID that's present in the
41   sink device. The .<code class="function">transfer</code> function can also be used to execute such
42   transactions. The <code class="function">drm_dp_aux_register_i2c_bus</code> function registers an
43   I2C adapter that can be passed to <code class="function">drm_probe_ddc</code>. Upon removal, drivers
44   should call <code class="function">drm_dp_aux_unregister_i2c_bus</code> to remove the I2C adapter.
45   The I2C adapter uses long transfers by default; if a partial response is
46   received, the adapter will drop down to the size given by the partial
47   response for this transaction only.
48   </p><p>
49
50   Note that the aux helper code assumes that the .<code class="function">transfer</code> function
51   only modifies the reply field of the drm_dp_aux_msg structure.  The
52   retry logic and i2c helpers assume this is the case.
53</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-drm-dp-aux-msg.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02s05.html#idp1125808116">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-drm-dp-dpcd-readb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct drm_dp_aux_msg</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">drm_dp_dpcd_readb</span></td></tr></table></div></body></html>
54