Skip to content

Linux Subsystems

Linux subsystems provide reusable kernel frameworks for common hardware classes and data paths. Instead of exposing every device as a custom character driver, a driver can register with an existing subsystem and inherit a standard user-space ABI.

Why Subsystems Matter

Subsystems help keep drivers portable and maintainable:

  • Device Tree describes the hardware connection.
  • The bus layer, such as I2C or SPI, handles device communication.
  • The subsystem defines the user-space interface.
  • The driver focuses on device-specific register access and event handling.

Subsystem Map

Subsystem Main Purpose Typical User-Space Interface Related Labs
IIO Sensors and ADC-style sampled data /sys/bus/iio, /dev/iio:deviceX Day33 - Day42
Input Keys, buttons, touch, gesture-like input events /dev/input/eventX Day43 - Day44
TTY / UART Serial communication /dev/tty* Day29, Day31
GPIO / gpiod GPIO descriptor access and GPIO-backed functions sysfs/debug tools, driver APIs Day09, Day11 - Day14
hwmon Hardware monitoring values such as temperature /sys/class/hwmon Day20 - Day22
Device Tree Overlay Hardware description and driver binding /boot/firmware/overlays, kernel probe path Day04 - Day09
  1. Start with Device Tree Overlay to understand how hardware is described.
  2. Review GPIO and gpiod to understand descriptor-based GPIO lookup.
  3. Study hwmon as a simple subsystem with a standard sysfs ABI.
  4. Move to IIO for buffered sensor data, triggers, FIFO, scan masks, and timestamps.
  5. Review Input for event reporting and /dev/input/eventX integration.
  6. Use TTY / UART to understand Linux serial devices and line discipline concepts.