1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>hsi_async</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="hsi.html" title="Chapter 11. High Speed Synchronous Serial Interface (HSI)"><link rel="prev" href="API-hsi-alloc-msg.html" title="hsi_alloc_msg"><link rel="next" href="API-hsi-claim-port.html" title="hsi_claim_port"></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">hsi_async</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-hsi-alloc-msg.html">Prev</a> </td><th width="60%" align="center">Chapter 11. High Speed Synchronous Serial Interface (HSI)</th><td width="20%" align="right"> <a accesskey="n" href="API-hsi-claim-port.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-hsi-async"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hsi_async — 2 Submit an HSI transfer to the controller 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">hsi_async </b>(</code></td><td>struct hsi_client * <var class="pdparam">cl</var>, </td></tr><tr><td> </td><td>struct hsi_msg * <var class="pdparam">msg</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1115764892"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>cl</code></em></span></dt><dd><p> 4 HSI client sending the transfer 5 </p></dd><dt><span class="term"><em class="parameter"><code>msg</code></em></span></dt><dd><p> 6 The HSI transfer passed to controller 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1115767524"></a><h2>Description</h2><p> 8 The HSI message must have the channel, ttype, complete and destructor 9 fields set beforehand. If nents > 0 then the client has to initialize 10 also the scatterlists to point to the buffers to write to or read from. 11 </p><p> 12 13 HSI controllers relay on pre-allocated buffers from their clients and they 14 do not allocate buffers on their own. 15 </p><p> 16 17 Once the HSI message transfer finishes, the HSI controller calls the 18 complete callback with the status and actual_len fields of the HSI message 19 updated. The complete callback can be called before returning from 20 hsi_async. 21 </p><p> 22 23 Returns -errno on failure or 0 on success 24</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-hsi-alloc-msg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="hsi.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-hsi-claim-port.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">hsi_alloc_msg</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">hsi_claim_port</span></td></tr></table></div></body></html> 25