1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct input_polled_dev</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="ch08s03.html" title="Polled input devices"><link rel="prev" href="ch08s03.html" title="Polled input devices"><link rel="next" href="API-input-allocate-polled-device.html" title="input_allocate_polled_device"></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 input_polled_dev</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08s03.html">Prev</a>&#160;</td><th width="60%" align="center">Polled input devices</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-input-allocate-polled-device.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-input-polled-dev"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct input_polled_dev &#8212; 
2  simple polled input device
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct input_polled_dev {
5  void * private;
6  void (* open) (struct input_polled_dev *dev);
7  void (* close) (struct input_polled_dev *dev);
8  void (* poll) (struct input_polled_dev *dev);
9  unsigned int poll_interval;
10  unsigned int poll_interval_max;
11  unsigned int poll_interval_min;
12  struct input_dev * input;
13};  </pre></div><div class="refsect1"><a name="idp1114656620"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">private</span></dt><dd><p>
14private driver data.
15      </p></dd><dt><span class="term">open</span></dt><dd><p>
16driver-supplied method that prepares device for polling
17(enabled the device and maybe flushes device state).
18      </p></dd><dt><span class="term">close</span></dt><dd><p>
19driver-supplied method that is called when device is no
20longer being polled. Used to put device into low power mode.
21      </p></dd><dt><span class="term">poll</span></dt><dd><p>
22driver-supplied method that polls the device and posts
23input events (mandatory).
24      </p></dd><dt><span class="term">poll_interval</span></dt><dd><p>
25specifies how often the <code class="function">poll</code> method should be called.
26Defaults to 500 msec unless overridden when registering the device.
27      </p></dd><dt><span class="term">poll_interval_max</span></dt><dd><p>
28specifies upper bound for the poll interval.
29Defaults to the initial value of <em class="parameter"><code>poll_interval</code></em>.
30      </p></dd><dt><span class="term">poll_interval_min</span></dt><dd><p>
31specifies lower bound for the poll interval.
32Defaults to 0.
33      </p></dd><dt><span class="term">input</span></dt><dd><p>
34input device structure associated with the polled device.
35Must be properly initialized by the driver (id, name, phys, bits).
36      </p></dd></dl></div></div><div class="refsect1"><a name="idp1114664044"></a><h2>Description</h2><p>
37   Polled input device provides a skeleton for supporting simple input
38   devices that do not raise interrupts but have to be periodically
39   scanned or polled to detect changes in their state.
40</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08s03.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch08s03.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-input-allocate-polled-device.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Polled input devices&#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">input_allocate_polled_device</span></td></tr></table></div></body></html>
41