... Chapter 1 :An Introduction to Device Drivers
As the popularity of the Linux system continues to grow, the interest in
writing Linux device drivers steadily increases. Most of Linux is
independent ... special hardware.
Debugging techniques are vital tools for the programmer and are introduced
in Chapter 4, " ;Debugging Techniques& quot;. Then, with our new debugging...
... < ;linux/ module.h>.
As an example, an array that must have at least two and no more than four
values could be declared as:
int skull_array [4] ;
MODULE_PARM (skull_array, "2-4i"); ... (which does nothing in particular). This code will compile and run
under Linux kernel versions 2.0 through 2 .4. [4]
[4] This example, and all the others presented in this book, is ava...
... the same device)
is best solved by implementing one device node for each access policy. An
example of this practice can be found in the Linux tape driver, which
provides multiple device files ... same device. Different device files
will, for example, cause the drive to record with or without compression, or
to automatically rewind the tape when the device is closed.
Cloning...
... architecture-dependent value defined in < ;linux/ param.h>.
Current Linux versions define HZ to be 100 for most platforms, but some
platforms use 10 24, and the IA- 64 simulator uses 20. Despite what ... introduced the following symbols:
#include < ;linux/ param.h>
HZ
The HZ symbol specifies the number of clock ticks generated per
second.
#include < ;linux/ sched.h>...
... port);
Chapter 8 :Hardware Management
Although playing with scull and similar toys is a good introduction to the
software interface of a Linux device driver, implementing a real device
requires ...
supported by version 2 .4 of the kernel:
IA-32 (x86)
The architecture supports all the functions described in this chapter.
Port numbers are of type unsigned short.
IA- 64 (Itanium...