- motivation:
- no uniform, comprehensive model, only bus specific lists of devices
-
procfs was getting messy
- more and more hotpluggable devices
- driver model: uniform model for representing busses, devices and
drivers.
- sysfs: special file system that exports hierarchical view of all
the devices in the system
- the new driver model was introduced somewhere 2.5 and has since
evolved a lot!
- Characteristics:
- discoverable (class)
- one value per sysfs file
- handles reference counting
- complex, but with easy interfaces
- generic hotplug support
example
$ tree -L 1 /sys/
/sys/
|-- block
|-- bus
|-- class
|-- devices
|-- firmware
|-- fs
|-- kernel
|-- module
`-- power
explore with
tree(1)