Managing GPIO into the kernel
Having the ability to manage one or more GPIO lines from the user space is really important because it drastically simplifies the developer's job, but in some circumstances, that is not enough to solve a task. As you already saw in Chapter 3 , C Compiler, Device Drivers, and Useful Developing Techniques, Writing our own Device Driver , where we introduced a kernel driver involving two GPIO lines, it was clear that if the pulse events go over a certain frequency, a user-space application is not suitable anymore and the management must be moved into the kernel.
However, the speed is not the only reason why we should move into the kernel space; another good reason is the abstraction level that the kernel offers to developers. In fact, we already saw that, for example, a simple GPIO line can be abstracted as an LED device with the ability to be managed by several triggers (refer to Chapter 3 , C Compiler, Device Drivers, and Useful Developing Techniques, The Device...