The drivers: /sys/class
This is a view of the device drivers presented by their type. In other words, it is a software view rather than a hardware view. Each of the subdirectories represents a class of driver and is implemented by a component of the driver framework. For example, UART devices are managed by the tty layer, and you will find them in /sys/class/tty. Likewise, you will find network devices in /sys/class/net, input devices such as the keyboard, the touchscreen, and the mouse in /sys/class/input, and so on.
There is a symbolic link in each subdirectory for each instance of that type of device pointing to its representation in /sys/device.
To take a concrete example, let's look at the serial ports on the Versatile PB. First of all, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access