1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct mipi_dsi_host_ops</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#idp1126139892" title="MIPI DSI Helper Functions Reference"><link rel="prev" href="API-struct-mipi-dsi-packet.html" title="struct mipi_dsi_packet"><link rel="next" href="API-struct-mipi-dsi-host.html" title="struct mipi_dsi_host"></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 mipi_dsi_host_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-mipi-dsi-packet.html">Prev</a>&#160;</td><th width="60%" align="center">MIPI DSI Helper Functions Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-struct-mipi-dsi-host.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-mipi-dsi-host-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct mipi_dsi_host_ops &#8212; 
2     DSI bus operations
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct mipi_dsi_host_ops {
5  int (* attach) (struct mipi_dsi_host *host,struct mipi_dsi_device *dsi);
6  int (* detach) (struct mipi_dsi_host *host,struct mipi_dsi_device *dsi);
7  ssize_t (* transfer) (struct mipi_dsi_host *host,const struct mipi_dsi_msg *msg);
8};  </pre></div><div class="refsect1"><a name="idp1126162724"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">attach</span></dt><dd><p>
9   attach DSI device to DSI host
10      </p></dd><dt><span class="term">detach</span></dt><dd><p>
11   detach DSI device from DSI host
12      </p></dd><dt><span class="term">transfer</span></dt><dd><p>
13   transmit a DSI packet
14      </p></dd></dl></div></div><div class="refsect1"><a name="idp1126165380"></a><h2>Description</h2><p>
15   DSI packets transmitted by .<code class="function">transfer</code> are passed in as mipi_dsi_msg
16   structures. This structure contains information about the type of packet
17   being transmitted as well as the transmit and receive buffers. When an
18   error is encountered during transmission, this function will return a
19   negative error code. On success it shall return the number of bytes
20   transmitted for write packets or the number of bytes received for read
21   packets.
22   </p><p>
23
24   Note that typically DSI packet transmission is atomic, so the .<code class="function">transfer</code>
25   function will seldomly return anything other than the number of bytes
26   contained in the transmit buffer on success.
27</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-mipi-dsi-packet.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02s05.html#idp1126139892">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-struct-mipi-dsi-host.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct mipi_dsi_packet</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 mipi_dsi_host</span></td></tr></table></div></body></html>
28