
Linux Device Drivers in Action
Demystifying LDM to build production-grade char, platform, I (2)C, NIC, and block drivers
Kaiwan N. Billimoria(Author)
Packt Publishing
Will be published approx. on 30. March 2026
Book
Paperback/Softback
978-1-83588-186-6 (ISBN)
Description
Master Linux Device Drivers with the modern LDM to write char, platform, I (2)C, NIC, and block drivers on Linux 6.x, backed by real-world code, best practices, and hands-on guidance
Key Features
Begin by learning to write a char (misc) driver, interface with userspace, and grasp the modern LDM
Work with hardware interrupts, peripheral I/O, the Device Tree, and common kernel mechanisms
Write practical platform, I (2)C, PCI, NIC, USB, input, and block device drivers
Book DescriptionLearn Linux Device Drivers is your practical guide to understanding the modern Linux Device Model (LDM) and writing real, working device drivers for modern Linux. Written by Linux expert Kaiwan N Billimoria, this book takes you through the fundamentals of character, platform, network, USB, input, and block drivers, all based on the latest Linux 6.12 LTS kernel.
Starting with the basics, you'll learn how to create and interface with character device drivers. You'll then move onto platform drivers (useful for many typical SoC IP blocks), and the Device Tree (DT), including DT overlays. The book guides you through working with hardware I/O memory, handling hardware interrupts, using kernel APIs for delays, timers, kthreads, and workqueues, and even writing an I (2)C sensor driver. Finally, you'll dive into PCI(e), NIC, USB, input, and block device drivers, rounding out your skills with practical, industry-relevant knowledge. Packed with real-world driver code, best practices, and tips to avoid pitfalls, this book equips you with the skills to confidently build Linux drivers for real projects.
By the end of this book, you'll be ready to write reliable Linux device drivers for multiple types of hardware and use cases, and it also serves as a strong companion to the author's Linux Kernel Programming books.What you will learn
Write a simple yet complete misc class character device driver
Perform user-kernel interfacing via multiple popular methods
Understand platform devices and write a basic platform driver
Work with the Device Tree (DT) and apply DT Overlays
Perform I/O on hardware chip memory and handle hardware interrupts
Use kernel APIs for delays, timers, kthreads, and workqueues
Write and test an I (2)C sensor driver on real hardware
Learn the framework and details for PCI(e), NIC, USB, input, and block device drivers
Who this book is forThis book is for beginners in Linux driver development as well as experienced developers seeking to deepen their skills and overcome common challenges in writing Linux kernel drivers. If you need to work with peripheral I/O, handle interrupts, or write I (2)C, platform, input, PCI(e), network, USB, or block drivers, this book will guide you. A basic understanding of kernel internals, APIs, modules, and synchronization is recommended.
Key Features
Begin by learning to write a char (misc) driver, interface with userspace, and grasp the modern LDM
Work with hardware interrupts, peripheral I/O, the Device Tree, and common kernel mechanisms
Write practical platform, I (2)C, PCI, NIC, USB, input, and block device drivers
Book DescriptionLearn Linux Device Drivers is your practical guide to understanding the modern Linux Device Model (LDM) and writing real, working device drivers for modern Linux. Written by Linux expert Kaiwan N Billimoria, this book takes you through the fundamentals of character, platform, network, USB, input, and block drivers, all based on the latest Linux 6.12 LTS kernel.
Starting with the basics, you'll learn how to create and interface with character device drivers. You'll then move onto platform drivers (useful for many typical SoC IP blocks), and the Device Tree (DT), including DT overlays. The book guides you through working with hardware I/O memory, handling hardware interrupts, using kernel APIs for delays, timers, kthreads, and workqueues, and even writing an I (2)C sensor driver. Finally, you'll dive into PCI(e), NIC, USB, input, and block device drivers, rounding out your skills with practical, industry-relevant knowledge. Packed with real-world driver code, best practices, and tips to avoid pitfalls, this book equips you with the skills to confidently build Linux drivers for real projects.
By the end of this book, you'll be ready to write reliable Linux device drivers for multiple types of hardware and use cases, and it also serves as a strong companion to the author's Linux Kernel Programming books.What you will learn
Write a simple yet complete misc class character device driver
Perform user-kernel interfacing via multiple popular methods
Understand platform devices and write a basic platform driver
Work with the Device Tree (DT) and apply DT Overlays
Perform I/O on hardware chip memory and handle hardware interrupts
Use kernel APIs for delays, timers, kthreads, and workqueues
Write and test an I (2)C sensor driver on real hardware
Learn the framework and details for PCI(e), NIC, USB, input, and block device drivers
Who this book is forThis book is for beginners in Linux driver development as well as experienced developers seeking to deepen their skills and overcome common challenges in writing Linux kernel drivers. If you need to work with peripheral I/O, handle interrupts, or write I (2)C, platform, input, PCI(e), network, USB, or block drivers, this book will guide you. A basic understanding of kernel internals, APIs, modules, and synchronization is recommended.
More details
Language
English
Place of publication
Birmingham
United Kingdom
Dimensions
Height: 235 mm
Width: 191 mm
ISBN-13
978-1-83588-186-6 (9781835881866)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Person
Kaiwan N. Billimoria taught himself BASIC programming on his dad's IBM PC back in 1983. He was programming in C and Assembly on DOS until he discovered the joys of Unix, and by around 1997, Linux!
Kaiwan has worked on many aspects of the Linux system programming stack, including Bash scripting, system programming in C, kernel internals, device drivers, and embedded Linux work. He has actively worked on several commercial/FOSS projects. His contributions include drivers to the mainline Linux OS and many smaller projects hosted on GitHub. His Linux passion feeds well into his passion for teaching these topics to engineers, which he has done for well over two decades now. He's also the author of Hands-On System Programming with Linux, Linux Kernel Programming (and its Part 2 book) and Linux Kernel Debugging. It doesn't hurt that he is a recreational ultrarunner too.
Kaiwan has worked on many aspects of the Linux system programming stack, including Bash scripting, system programming in C, kernel internals, device drivers, and embedded Linux work. He has actively worked on several commercial/FOSS projects. His contributions include drivers to the mainline Linux OS and many smaller projects hosted on GitHub. His Linux passion feeds well into his passion for teaching these topics to engineers, which he has done for well over two decades now. He's also the author of Hands-On System Programming with Linux, Linux Kernel Programming (and its Part 2 book) and Linux Kernel Debugging. It doesn't hurt that he is a recreational ultrarunner too.
Content
Table of Contents
Writing a misc Character Device Driver
User-Kernel Communication Pathways
The modern LDM and Writing Platform Drivers
The Device Tree
Working with Hardware I/O Memory
Handling Hardware Interrupts
Working with Delays, Timers, Threads, and Workqueues
Writing a simple Input Device Driver
Writing a skeleton PCIe Driver
Writing a PCI NIC Device Driver
Writing a modern Block Device Driver
Writing a misc Character Device Driver
User-Kernel Communication Pathways
The modern LDM and Writing Platform Drivers
The Device Tree
Working with Hardware I/O Memory
Handling Hardware Interrupts
Working with Delays, Timers, Threads, and Workqueues
Writing a simple Input Device Driver
Writing a skeleton PCIe Driver
Writing a PCI NIC Device Driver
Writing a modern Block Device Driver