did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780132396554

Essential Linux Device Drivers

by
  • ISBN13:

    9780132396554

  • ISBN10:

    0132396556

  • Edition: 1st
  • Format: Hardcover
  • Copyright: 2008-03-27
  • Publisher: Prentice Hall

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $54.99 Save up to $22.00
  • Rent Book $32.99
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

"Probably the most wide ranging and complete Linux device driver book Irs"ve read." --Alan Cox, Linux Guru and Key Kernel Developer "Very comprehensive and detailed, covering almost every single Linux device driver type." --Theodore Tsrs"o, First Linux Kernel Developer in North America and Chief Platform Strategist of the Linux Foundation The Most Practical Guide to Writing Linux Device Drivers Linux now offers an exceptionally robust environment for driver development: with todayrs"s kernels, what once required years of development time can be accomplished in days. In this practical, example-driven book, one of the worldrs"s most experienced Linux driver developers systematically demonstrates how to develop reliable Linux drivers for virtually any device.Essential Linux Device Driversis for any programmer with a working knowledge of operating systems and C, including programmers who have never written drivers before. Sreekrishnan Venkateswaran focuses on the essentials, bringing together all the concepts and techniques you need, while avoiding topics that only matter in highly specialized situations. Venkateswaran begins by reviewing the Linux 2.6 kernel capabilities that are most relevant to driver developers. He introduces simple device classes; then turns to serial buses such as I2C and SPI; external buses such as PCMCIA, PCI, and USB; video, audio, block, network, and wireless device drivers; user-space drivers; and drivers for embedded Linuxone of todayrs"s fastest growing areas of Linux development. For each, Venkateswaran explains the technology, inspects relevant kernel source files, and walks through developing a complete example. bull; Addresses drivers discussed in no other book, including drivers for I2C, video, sound, PCMCIA, and different types of flash memory bull; Demystifies essential kernel services and facilities, including kernel threads and helper interfaces bull; Teaches polling, asynchronous notification, and I/O control bull; Introduces the Inter-Integrated Circuit Protocol for embedded Linux drivers bull; Covers multimedia device drivers using the Linux-Video subsystem and Linux-Audio framework bull; Shows how Linux implements support for wireless technologies such as Bluetooth, Infrared, WiFi, and cellular networking bull; Describes the entire driver development lifecycle, through debugging and maintenance bull; Includes reference appendixes covering Linux assembly, BIOS calls, and Seq files

Author Biography

Sreekrishnan Venkateswaran has spent more than a decade working in IBM product development laboratories. He has ported Linux to devices ranging from wristwatches and music players to PDAs, VoIP phones, and even pacemaker programmers. He was a Contributing Editor and kernel columnist for Linux Magazine for more than two years.

Table of Contents

Foreword
Preface
Acknowledgmentsp. xxix
About the Authorp. xxx
Introductionp. 1
Evolutionp. 2
The GNU Copyleftp. 3
Kernelorgp. 4
Mailing Lists and Forumsp. 4
Linux Distributionsp. 5
Looking at the Sourcesp. 6
Building the Kernelp. 10
Loadable Modulesp. 12
Before Startingp. 14
A Peek Inside the Kernelp. 17
Booting Upp. 18
Kernel Mode and User Modep. 30
Process Context and Interrupt Contextp. 30
Kernel Timersp. 31
HZ and Jiffiesp. 31
Long Delaysp. 33
Short Delaysp. 36
Pentium Time Stamp Counterp. 36
Real Time Clockp. 37
Concurrency in the Kernelp. 39
Spinlocks and Mutexesp. 39
Atomic Operatorsp. 45
Reader-Writer Locksp. 46
Debuggingp. 48
Process Filesystemp. 49
Allocating Memoryp. 49
Looking at the Sourcesp. 52
Kernel Facilitiesp. 55
Kernel Threadsp. 56
Creating a Kernel Threadp. 56
Process States and Wait Queuesp. 61
User Mode Helpersp. 63
Helper Interfacesp. 65
Linked Listsp. 65
Hash Listsp. 72
Work Queuesp. 72
Notifier Chainsp. 74
Completion Interfacep. 78
Kthread Helpersp. 81
Error-Handling Aidsp. 83
Looking at the Sourcesp. 85
Laying the Groundworkp. 89
Introducing Devices and Driversp. 90
Interrupt Handlingp. 92
Interrupt Contextp. 92
Assigning IRQsp. 94
Device Example: Roller Wheelp. 94
Softirqs and Taskletsp. 99
The Linux Device Modelp. 103
Udevp. 103
Sysfs, Kobjects, and Device Classesp. 106
Hotplug and Coldplugp. 110
Microcode Downloadp. 111
Module Autoloadp. 112
Memory Barriersp. 114
Power Managementp. 114
Looking at the Sourcesp. 115
Character Driversp. 119
Char Driver Basicsp. 120
Device Example: System CMOSp. 121
Driver Initialization
Open and Release
Exchanging Data
Seek
Control
Sensing Data Availability
Poll
Fasync
Talking to the Parallel Port
Device Example: Parallel Port LED Board
RTC Subsystem
Pseudo Char Drivers
Misc Drivers
Device Example: Watchdog Timer
Character Caveats
Looking at the Sources
6556_Bookindb i6556_ix 3/4/08 9:31:21 AM
Serial Driversp. 171
Layered Architecturep. 173
UART Driversp. 176
Device Example: Cell Phonep. 178
RS-485p. 191
TTY Driversp. 192
Line Disciplinesp. 194
Device Example: Touch Controllerp. 195
Looking at the Sourcesp. 205
Input Driversp. 207
Input Event Driversp. 210
The Evdev Interfacep. 210
Input Device Driversp. 216
Seriop. 217
Keyboardsp. 217
Micep. 220
Touch Controllersp. 227
Accelerometersp. 228
Output Eventsp. 228
Debuggingp. 230
Looking at the Sourcesp. 231
The Inter-Integrated Circuit Protocolp. 233
Whats I2C/SMBus?p. 234
I2C Corep. 235
Bus Transactionsp. 237
Device Example: EEPROMp. 238
Initializingp. 238
Probing the Devicep. 241
Checking Adapter Capabilitiesp. 244
Accessing the Devicep. 244
More Methodsp. 246
Device Example: Real Time Clockp. 247
I2C-devp. 251
Hardware Monitoring Using LM-Sensorsp. 251
The Serial Peripheral Interface Busp. 251
The 1-Wire Busp. 254
Debuggingp. 254
Looking at the Sourcesp. 255
PCMCIA and Compact Flashp. 257
Whats PCMCIA/CF?p. 258
Linux-PCMCIA Subsystemp. 260
Host Controller Driversp. 262
PCMCIA Corep. 263
Driver Servicesp. 263
Client Driversp. 264
Data Structuresp. 264
Device Example: PCMCIA Cardp. 267
Tying the Pieces Togetherp. 271
PCMCIA Storagep. 272
Serial PCMCIAp. 272
Debuggingp. 273
Looking at the Sourcesp. 275
Peripheral Comp
Table of Contents provided by Publisher. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

= 0) {slash = '\\';} else {slash = '/';}openLoc = figLoc.substring(0, figLoc.lastIndexOf(slash) + 1);while (pPage.substring(0,3) == '../') {openLoc = openLoc.substring(0, openLoc.lastIndexOf(slash, openLoc.length - 2)+ 1);pPage = pPage.substring(3, pPage.length + 1);}popUpWin =window.open('','popWin','resizable=1,scrollbars=1,location=0,toolbar=0,width=525,height=394');figDoc = popUpWin.document;zhtm= ' ' + pPage + ' ';zhtm += ' ';zhtm += ' ';zhtm += ' ';zhtm += '' + pPage.substring(pPage.lastIndexOf('/') + 1, pPage.length) + '';zhtm += ' ';figDoc.write(zhtm);figDoc.close();}// modified 3.1.99 RWE v4.1 --> Preface Essential Linux Device Driversby Sreekrishnan Venkiteswaran PrefaceIt was the late nineties and at IBM, we were putting the Linux kernel on a wrist watch. The target device was tiny, but the task was turning out to be tough. The Memory Technology Devices subsystem didn't exist in the kernel, which meant that before a filesystem could start life on the watch's flash memory, we had to develop the necessary storage driver from scratch. Interfacing the watch's touch screen with user applications was complicated since the kernel'sinputevent driver interface hadn't been conceived yet. Getting X-Windows to run on the watch's LCD wasn't easy since it didn't work well with framebuffer drivers. Of what use is a water-proof Linux wrist watch if you can't stream stock quotes from your bath tub? Bluetooth integration with Linux was several years away, and months were spent porting a proprietary Bluetooth stack to Internet-enable the watch. Power management support was good enough only to squeeze a few hours of juice from the watch's battery, hence we had work cut out on that front too. Linux-Infrared was still unstable, so we had to coax the stack before we could use an Infrared keyboard for data entry. And we had to compile the compiler and cross-compile a compact application-set since there were no accepted distributions in the consumer electronics space.Fast forward to the present: The baby penguin has grown into a healthy teenager. What took thousands of lines of code and a year in development back then, can be accomplished in a few days with the current kernels. But to become a versatile kernel engineer who can magically weave solutions, you need to understand the myriad features and facilities that Linux offers today. About the BookAmong the various subsystems residing in the kernel source tree, thedrivers/directory constitutes the single largest chunk and is several times bigger than the others. With new and diverse technologies

Rewards Program