Understanding the Structure of a Linux Kernel Device Driver
summary
Covers the kernel driver architecture by walking through five hands‑on iterations that build a working LED driver on a small network‑booted Linux board (Toradex demo): starts as a char device with direct MMIO access using ioremap and request_mem_region, adds user interface via the LED framework, replaces direct register writes with the gpiod API, and finally registers as a platform device using a device tree compatible string "labworks,rv-led". Shows MMIO vs port I/O, probe life cycle, device tree edits, and a size drop of 164→40→~30 lines.
AI-written summary · about
chapters (20)
- 0:00Intro
- 1:03ABOUT THE TALK
- 2:17AGENDA
- 3:45WHAT ARE DEVICE DRIVERS?
- 5:52DEVICE DRIVER IS AN ABSTRACTION
- 6:12CHAR DRIVER: A SIMPLE ABSTRACTION
- 9:03CHAR DRIVER AS A FILE ABSTRACTION
- 10:00IMPLEMENTING A CHAR DRIVER
- 19:10TALKING TO THE HARDWARE
- 20:26MEMORY-MAPPED 1/0
- 21:17TALKING TO A MMIO DEVICE
- 26:31LED DRIVER
- 28:47THE DRIVER MODEL
- 30:17FRAMEWORKS
- 31:42USING THE LEDS FRAMEWORK
- 44:00ADVANTAGES
- 44:36BUSES AND POWER MANAGEMENT
- 45:33PLATFORM BUS
- 46:13REGISTERING A DEVICE
- 52:19A FLEXIBLE MODEL (cont.)
related talks
41mHow to Avoid Writing Device Drivers for Embedded Linux
10mUpstreaming a linux kernel driver.
01h 27mWorkshop: My First Kernel Driver
46mEarly Platform Drivers in Linux Kernel
01h 13mDevice Tree for Dummies!
52mIn the Kernel Trenches: Mastering Ethernet Drivers on Linux
50mHow Not to Write X86 Platform Drivers
52mIn the Kernel Trenches: Mastering Ethernet Drivers on Linux
