Often, a key part of writing a device driver is really the work of trapping into and handling the hardware interrupt that the chip you're writing the driver for emits. How do you do this? The trouble is that the way that hardware interrupts are routed from the interrupt controller chip(s) to the CPU(s) varies widely; it is very platform-specific. The good news is that the Linux kernel provides an abstraction layer to abstract away all the hardware-level differences; it's referred to as the generic interrupt (or IRQ) handling layer. Essentially, it performs the required work under the hood and exposes APIs and data structures that are completely generic. Thus, at least theoretically, your code will work on any platform. This generic IRQ layer is what we, primarily as driver authors, shall be using, of course; all the APIs and helper routines we use fall into this category.
Recall that it's really the core kernel that,...