This file is indexed.

/usr/share/doc/libcomedi-dev/html/drivercaveats.html is in libcomedi-dev 0.10.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>6.5.&#160; Device driver caveats</title><link rel="stylesheet" type="text/css" href="comedilib.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Comedi"><link rel="up" href="driverwriting.html" title="6.&#160; Writing a Comedi driver"><link rel="prev" href="drivercallbacks.html" title="6.4.&#160; Callbacks, events and interrupts"><link rel="next" href="integratingdriver.html" title="6.6.&#160; Integrating the driver in the Comedi library"></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">6.5.&#160;
Device driver caveats
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="drivercallbacks.html">Prev</a>&#160;</td><th width="60%" align="center">6.&#160;
Writing a <acronym class="acronym">Comedi</acronym> driver
</th><td width="20%" align="right">&#160;<a accesskey="n" href="integratingdriver.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="drivercaveats"></a>6.5.&#160;
Device driver caveats
</h3></div></div></div><p>
A few things to strive for when writing a new driver:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
Some DAQ cards consist of different <span class="quote">&#8220;<span class="quote">layers</span>&#8221;</span> of hardware,
which can each be given their own device driver. Examples are:
some of the National Instruments cards, that all share the same
<span class="emphasis"><em>Mite</em></span> PCI driver chip; the ubiquitous parallel
port, that can be used for simple digital IO acquisitions. If your
new card has such a multi-layer design too, please take the effort to
provide drivers for each layer separately.
</p></li><li class="listitem"><p>
Your hardware driver should be functional appropriate to the resources
allocated.  I.e., if the driver is fully functional when configured
with an IRQ and DMA, it should still function moderately well with
just an IRQ, or still do minor tasks without IRQ or DMA.  Does your
driver really require an IRQ to do digital I/O?  Maybe someone will
want to use your driver <span class="emphasis"><em>just</em></span> to do digital I/O
and has no interrupts available.
</p></li><li class="listitem"><p>
Drivers are to have absolutely <span class="strong"><strong>no</strong></span>
global variables (apart from read-only, constant data, or data structures
shared by all devices), mainly because the existence of global variables
immediately negates any possibility of using the driver for two
devices. The pointer <em class="structfield"><code>dev-&gt;private</code></em> should be used
to point to a structure containing any additional variables needed by
a driver/device combination.
</p></li><li class="listitem"><p>
Drivers should report errors and warnings via the
<code class="function">comedi_error</code> function.
(This is <span class="emphasis"><em>not</em></span> the same function as the user-space
<code class="function"><a class="link" href="func-ref-comedi-perror.html" title="comedi_perror">comedi_perror</a></code> function.)

</p></li></ul></div><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="drivercallbacks.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="driverwriting.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="integratingdriver.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.4.&#160;
Callbacks, events and interrupts
&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;6.6.&#160;
Integrating the driver in the <acronym class="acronym">Comedi</acronym> library
</td></tr></table></div></body></html>