Chapter 14: Introduction to the Linux Device Model
Until version 2.5, the Linux kernel had no way to describe and manage objects, and its code reusability was not as enhanced as it is now. In other words, there was no device topology, nor organization as we know it is in sysfs nowadays. There was no information on subsystem relationships, nor on how the system is put together. Then came the Linux Device Model (LDM), which introduced the following features:
- The concept of classes. They are used to group devices of the same type or that expose the same functionalities (for example, mice and keyboards are both input devices).
- Communication with the user space through a virtual filesystem, allowing you to manage and enumerate devices and the properties they expose from user space.
- Object life cycle management using reference counting.
- A power management facility, allowing you to handle the order in which devices should shut down.
- The reusability of the code. Classes...