October 2017
Intermediate to advanced
586 pages
14h 8m
English
Almost every GPIO controller driver was using an IRQ domain for the same purpose. Instead of each of them rolling their own irqdomain handling, and so on, kernel developers decided to move that code to the gpiolib framework, by means of the GPIOLIB_IRQCHIP Kconfig symbol, in order to harmonize the development and avoid redundant code.
That portion of code helps with handling the management of GPIO irqchips and the associated irq_domain and resource allocation callbacks, as well as their setup, using the reduced set of helper functions. These are gpiochip_irqchip_add() and gpiochip_set_chained_irqchip().
gpiochip_irqchip_add(): This adds an irqchip to a gpiochip. A summary of this function's actions is as follows: ...