Kernel Driver API Reference
This section collects Linux kernel APIs used by the character driver, blocking I/O, pollable driver, fasync/SIGIO, GPIO, and IRQ labs.
Driver Core
| API |
Purpose |
| Driver Core APIs |
Register buses, devices, and drivers and understand matching and probe lifecycle |
Character Device Registration
User Access and Control Plane
Blocking I/O and Event Notification
Locking, GPIO, and IRQ
| API |
Purpose |
| spinlock |
Protect shared state accessed from Process Context and IRQ Context using an interrupt-safe spinlock. |
| mutex |
Protect shared state in sleepable contexts such as Process Context, workqueues, and kernel threads. |
| rw_semaphore |
Reader-writer synchronization allowing multiple concurrent readers. |
| devm_gpiod_get |
Get GPIO descriptors from Device Tree |
| devm_request_threaded_irq |
Register threaded IRQ handlers |
Deferred Execution
| API |
Purpose |
| workqueue |
Execute deferred work in process context using kernel worker threads |
| kthread |
Create and manage long-lived kernel execution threads |