1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>hsi_register_port_event</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&#160;11.&#160;High Speed Synchronous Serial Interface (HSI)"><link rel="prev" href="API-hsi-release-port.html" title="hsi_release_port"><link rel="next" href="API-hsi-unregister-port-event.html" title="hsi_unregister_port_event"></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_register_port_event</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-hsi-release-port.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;11.&#160;High Speed Synchronous Serial Interface (HSI)</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-hsi-unregister-port-event.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-hsi-register-port-event"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hsi_register_port_event &#8212; 
2     Register a client to receive port events
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_register_port_event </b>(</code></td><td>struct hsi_client * <var class="pdparam">cl</var>, </td></tr><tr><td>&#160;</td><td>void (*<var class="pdparam">handler</var>)
4     <code>(</code>struct hsi_client *, unsigned long<code>)</code><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1115789972"></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>
5     HSI client that wants to receive port events
6    </p></dd><dt><span class="term"><em class="parameter"><code>handler</code></em></span></dt><dd><p>
7     Event handler callback
8    </p></dd></dl></div></div><div class="refsect1"><a name="idp1115792620"></a><h2>Description</h2><p>
9   Clients should register a callback to be able to receive
10   events from the ports. Registration should happen after
11   claiming the port.
12   The handler can be called in interrupt context.
13   </p><p>
14
15   Returns -errno on error, or 0 on success.
16</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-release-port.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="hsi.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-hsi-unregister-port-event.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">hsi_release_port</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">hsi_unregister_port_event</span></td></tr></table></div></body></html>
17