summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/gpiokeys.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/gpiokeys.4 3.html')
-rw-r--r--static/freebsd/man4/gpiokeys.4 3.html111
1 files changed, 111 insertions, 0 deletions
diff --git a/static/freebsd/man4/gpiokeys.4 3.html b/static/freebsd/man4/gpiokeys.4 3.html
new file mode 100644
index 00000000..c17dfbf7
--- /dev/null
+++ b/static/freebsd/man4/gpiokeys.4 3.html
@@ -0,0 +1,111 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">GPIOKEYS(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">GPIOKEYS(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">gpiokeys</code> &#x2014; <span class="Nd">GPIO
+ keys device driver</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp">To compile this driver into the kernel, place the following lines
+ in your kernel configuration file:</p>
+<div class="Bd Pp Bd-indent"><code class="Cd">options FDT</code>
+<br/>
+<code class="Cd">device gpio</code>
+<br/>
+<code class="Cd">device gpiokeys</code></div>
+<p class="Pp">Alternatively, to load the driver as a module at boot time, place
+ the following line in <a class="Xr">loader.conf(5)</a>:</p>
+<div class="Bd Pp Bd-indent Li">
+<pre>gpiokeys_load=&quot;YES&quot;</pre>
+</div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">gpiokeys</code> driver provides a way to
+ represent a set of general purpose inputs as a <a class="Xr">keyboard(4)</a>
+ device. At the moment the driver supports only <a class="Xr">FDT(4)</a>
+ based systems. The DTS determines what pins are mapped to buttons and what
+ key codes are generated for each virtual button. The
+ <a class="Xr">keyboard(4)</a> device can be used from userland to monitor
+ for input changes.</p>
+<p class="Pp">On an <a class="Xr">FDT(4)</a> based system the DTS part for a
+ <code class="Nm">gpiokeys</code> device usually looks like:</p>
+<div class="Bd Pp Li">
+<pre>/ {
+
+ ...
+
+ gpio_keys {
+ compatible = &quot;gpio-keys&quot;;
+
+ btn1 {
+ label = &quot;button1&quot;;
+ linux,code = &lt;KEY_1&gt;;
+ gpios = &lt;&amp;gpio 0 3 GPIO_ACTIVE_LOW&gt;
+ };
+
+ btn2 {
+ label = &quot;button2&quot;;
+ linux,code = &lt;KEY_2&gt;;
+ gpios = &lt;&amp;gpio 0 4 GPIO_ACTIVE_LOW&gt;
+ };
+ };
+};</pre>
+</div>
+<p class="Pp">For more details about the <var class="Va">gpios</var> property,
+ please consult
+ <span class="Pa">/usr/src/sys/dts/bindings-gpio.txt</span>.</p>
+<p class="Pp">The <code class="Nm">gpiokeys</code> driver supports two
+ properties for specifying a key code.</p>
+<p class="Pp">The property <var class="Va">freebsd,code</var> specifies a
+ <span class="Ux">FreeBSD</span> native scancode compatible with
+ <a class="Xr">kbdmap(5)</a> keyboard maps.</p>
+<p class="Pp">The property <var class="Va">linux,code</var> specifies an evdev
+ scancode. That scancode is internally translated to a native scancode. Note
+ that not all evdev scancodes have corresponding native scancodes. If a
+ scancode cannot be translated, then a diagnostic message is printed and the
+ input is ignored.</p>
+<p class="Pp">The property <var class="Va">label</var> is a descriptive name of
+ a button. It is used for diagnostic messages only. This property is
+ optional. If not set, the node name is used in its place.</p>
+<p class="Pp">The property <var class="Va">autorepeat</var> determines whether
+ autorepeat is enabled for a button.</p>
+<p class="Pp">The property <var class="Va">debounce-interval</var> defines
+ debouncing interval time in milliseconds. If not specified the interval
+ defaults to 5.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">fdt(4)</a>, <a class="Xr">gpio(4)</a>,
+ <a class="Xr">keyboard(4)</a>, <a class="Xr">kbdmap(5)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp">The <code class="Nm">gpiokeys</code> manual page first appeared in
+ <span class="Ux">FreeBSD 12.2</span>.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
+<p class="Pp">The <code class="Nm">gpiokeys</code> driver was written by
+ <span class="An">Oleksandr Tymoshenko</span>
+ &lt;<a class="Mt" href="mailto:gonzo@FreeBSD.org">gonzo@FreeBSD.org</a>&gt;.
+ This manual page was written by
+ <br/>
+ <span class="An">Andriy Gapon</span>
+ &lt;<a class="Mt" href="mailto:avg@FreeBSD.org">avg@FreeBSD.org</a>&gt;.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">August 5, 2020</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>