Skip to content

Kernel Driver Topics

This section organizes the kernel driver learning path into reusable topic pages.

The original Day-based labs are still preserved, but this section is intended for review and lookup. It focuses on the common patterns that appear repeatedly in Linux character drivers, GPIO drivers, pollable drivers, and event-driven kernel-to-user notification paths.

Learning Path

Step Topic Main Idea Related Labs
1 Linux Driver Model Understand device, driver, bus, matching, probe, and sysfs hierarchy Day71
2 Platform Bus Understand platform devices, platform drivers, matching, and Device Tree integration Day72
3 Character Device Basics Register a character device and expose a file interface Day05, Day06
4 Platform Driver and Device Tree Binding Bind hardware description to a driver with compatible Day08, Day09, Day10
5 GPIO and IRQ Driver Use gpiod, IRQ handlers, and deferred processing Day09, Day11, Day13
6 Blocking and Non-blocking I/O Implement read paths with wait queues and O_NONBLOCK Day12, Day14, Day18, Day50
7 Wait Queue and poll Support Make a driver visible to poll, select, and epoll Day12, Day15, Day50, Day51
8 Kernel Locking Protect shared kernel data using spinlocks, mutexes, and reader-writer semaphores Day88
9 epoll Scale event notification with Interest List, Ready List, LT, and ET Day86
10 Driver Control Plane Separate data path from configuration path using ioctl or sysfs Day16, Day17
11 fasync and SIGIO Notify user space asynchronously from a driver Day52
12 Deferred Work Selection Choose between Threaded IRQ, Workqueue, kthread_worker, and Dedicated kthread Day80, Day81, Day82, Day83

Core Driver Model

Device Tree
platform_device
platform_match()
platform_driver.probe()
initialize hardware and software state
file_operations
open/read/write/poll/ioctl/release
/dev/<name>
User-space application

Deferred Execution Learning Path

IRQ
IRQ Bottom Half
Workqueue
kthread
Deferred Work Selection
Wait Queue Internals