A critical feature of the 2.6 Linux kernel release was the advent of what is called the modern device model. Essentially, a series of complex tree-like hierarchical data structures model all devices present on the system. Actually, it goes well beyond this; the sysfs tree encompasses the following (among other things):
- Every bus present on the system (it can be a virtual or pseudo bus as well)
- Every device present on every bus
- Every device driver bound to a device on a bus
Thus, it's not just peripheral devices but also the underlying system buses, the devices on each bus and the device driver bound or that will bind to a device, that are created at runtime and maintained by the device model. The inner workings of this model are invisible to you, as a typical driver author; you don't really have to worry about it. On system boot, and whenever a new device becomes visible, the driver core (part of the built-in kernel machinery) generates...