Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 956

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>struct input_handler</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch08.html" title="Chapter&#160;8.&#160;Input Subsystem" /><link rel="prev" href="re703.html" title="struct input_dev" /><link rel="next" href="re705.html" title="struct input_handle" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct input_handler</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re703.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;8.&#160;Input Subsystem</th><td width="20%" align="right">&#160;<a accesskey="n" href="re705.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct input_handler"><a id="API-struct-input-handler"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct input_handler &#8212; 
     implements one of interfaces for input devices
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting">
struct input_handler {
  void * private;
  void (* event) (struct input_handle *handle, unsigned int type, unsigned int code, int value);
  int (* connect) (struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
  void (* disconnect) (struct input_handle *handle);
  void (* start) (struct input_handle *handle);
  const struct file_operations * fops;
  int minor;
  const char * name;
  const struct input_device_id * id_table;
  const struct input_device_id * blacklist;
  struct list_head h_list;
  struct list_head node;
};  </pre></div><div class="refsect1" title="Members"><a id="id2698979"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">private</span></dt><dd><p>
   driver-specific data
      </p></dd><dt><span class="term">event</span></dt><dd><p>
   event handler. This method is being called by input core with
   interrupts disabled and dev-&gt;event_lock spinlock held and so
   it may not sleep
      </p></dd><dt><span class="term">connect</span></dt><dd><p>
   called when attaching a handler to an input device
      </p></dd><dt><span class="term">disconnect</span></dt><dd><p>
   disconnects a handler from input device
      </p></dd><dt><span class="term">start</span></dt><dd><p>
   starts handler for given handle. This function is called by
   input core right after <code class="function">connect</code> method and also when a process
   that <span class="quote">&#8220;<span class="quote">grabbed</span>&#8221;</span> a device releases it
      </p></dd><dt><span class="term">fops</span></dt><dd><p>
   file operations this driver implements
      </p></dd><dt><span class="term">minor</span></dt><dd><p>
   beginning of range of 32 minors for devices this driver
   can provide
      </p></dd><dt><span class="term">name</span></dt><dd><p>
   name of the handler, to be shown in /proc/bus/input/handlers
      </p></dd><dt><span class="term">id_table</span></dt><dd><p>
   pointer to a table of input_device_ids this driver can
   handle
      </p></dd><dt><span class="term">blacklist</span></dt><dd><p>
   pointer to a table of input_device_ids this driver should
   ignore even if they match <em class="parameter"><code>id_table</code></em>
      </p></dd><dt><span class="term">h_list</span></dt><dd><p>
   list of input handles associated with the handler
      </p></dd><dt><span class="term">node</span></dt><dd><p>
   for placing the driver onto input_handler_list
      </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2699154"></a><h2>Description</h2><p>
   Input handlers attach to input devices and create input handles. There
   are likely several handlers attached to any given input device at the
   same time. All of them will get their copy of input event generated by
   the device.
   </p><p>

   Note that input core serializes calls to <code class="function">connect</code> and <code class="function">disconnect</code>
   methods.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re703.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch08.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re705.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct input_dev</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>struct input_handle</span></td></tr></table></div></body></html>