Chapter 6

Device Drivers

Device drivers are a key area of the kernel as many users judge operating system performance primarily by the number of peripherals for which drivers are available and how effectively they are supported. Consequently, large parts of the kernel sources are devoted to the implementation of device drivers.

Device drivers build on many different mechanisms provided by the central kernel (this is why drivers are sometimes referred to as kernel “ applications”). The immense number of drivers in the Linux kernel means that it is impossible to discuss all (or even a few) in detail. Fortunately, this is not necessary. The structures of the drivers are generally very similar—regardless of device—so that in this chapter we need only discuss a few key aspects common to all drivers. Since the objective of this book is to cover all important parts of the kernel, this chapter omits some of the more specific points of driver writing which would require a book of its own. However, two books that focus solely on driver writing are currently available. The classic text in this area is Linux Device Drivers by Corbet et al. [CRKH05]. We can recommend it wholeheartedly to anyone interested in or charged with writing a device driver. A recent addition to kernel hackers' bookshelves is Essential Linux Device Drivers by Venkateswaran [Ven08]. Developers who are able to read German will certainly also enjoy Linux Gerätetreiber by Quade and Kunst [QK06]. The quoted references are ...

Get Professional Linux Kernel Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.