Understanding the Structure of a Linux Kernel Device Driver
For newcomers, it's not easy to understand the structure of a device driver in the Linux kernel. In the end, a device driver is just an abstraction to a piece of hardware. But designing it in a way that it's reusable and maintainable is not that easy. That is why, over time, several concepts and abstractions were developed in the Linux kernel to write device drivers. From the way devices are declared to how drivers are instantiated, from the separation of devices and buses to APIs and subsystems used to export functionality to users. This presentation will be a walkthrough of the design concepts of a Linux kernel device driver, going over the main ideas of the driver model, so we can easily understand the structure of a Linux device driver and start writing our own.
Talk presented at Embedded Linux Conference 2021
Slides: https://www.dropbox.com/s/m5yafv9v2b3w1uv/slides.pdf?dl=0
Source code: https://www.dropbox.com/s/q2g7uodmyziuqyb/ldd.tar.bz2?dl=0