
Write a Linux LED Class Driver With Brightness Control
Write a Linux 6.12 LED class driver with led_classdev, brightness_set_blocking, max_brightness and triggers, and see it appear under /sys/class/leds.
Tag
71 posts

Write a Linux 6.12 LED class driver with led_classdev, brightness_set_blocking, max_brightness and triggers, and see it appear under /sys/class/leds.

Write a Linux 6.12 input driver for a GPIO button: devm_input_allocate_device, capability bits, a threaded IRQ, debounce, and events visible to evtest.

Request, configure and drive GPIO lines from a Linux 6.12 platform driver with devm_gpiod_get and the descriptor API, including active-low handling.

What a Linux 6.12 device driver is, how it reaches hardware through registers, port I/O, DMA and interrupts, and how it presents the device to user space.

Where the Linux 6.12 firmware loader searches for blobs, in what order, how initramfs and built-in firmware fit in, and how to read the failure messages.

How SR-IOV splits one PCIe device into virtual functions on Linux 6.12, how to enable them from sysfs, and how a PF driver supports sriov_configure.

Make a Linux 6.12 PCIe driver survive hot removal: detect all-ones reads, use pci_device_is_present, stop DMA and work, and get remove to finish cleanly.

Bind a PCI device to vfio-pci on Linux 6.12 and drive it from user space with the VFIO container and group ioctls: mmap a BAR, map DMA and read registers.

How an IOMMU translates and restricts device DMA on Linux 6.12, how IOMMU groups and domains work, and how to check the setup from sysfs and boot flags.

Implement struct pci_error_handlers in a Linux 6.12 driver: error_detected, slot_reset and resume, how the AER core drives them and what each must restore.

Choose between dma_alloc_coherent and dma_map_single in a Linux 6.12 PCI driver by lifetime, access pattern and cost, with the mask, sync and unmap rules.

Request MSI, MSI-X or legacy interrupts in a Linux 6.12 PCI driver with pci_alloc_irq_vectors, bind handlers per vector and release them in the right order.