Most embedded Linux driver and kernel engineers write using GPIOs or play with pin multiplexing. By pins, I mean outgoing line of component. SoC does multiplex pins, meaning that a pin may have several functions; for example, MX6QDL_PAD_SD3_DAT1 in arch/arm/boot/dts/imx6dl-pinfunc.h can be either an SD3 data line 1, UART1's cts/rts, Flexcan2's Rx, or normal GPIO.
The mechanism by which you choose the mode a pin should work in is called pin muxing. The system responsible for this is called the pin controller. In the second part of the chapter, we will discuss General Purpose Input Output (GPIO), which is a special function (mode) in which a pin can operate.
In this chapter, we will:
- Walk through the pin control subsystem and see how you can declare their nodes in the DT
- Explore both legacy integer-based GPIO interfaces and the new descriptor...