On Thu, Apr 20, 2017 at 11:54 AM, Yves Lefloch <YvesMarie_Lefloch@xxxxxxxxxxxxxxxx> wrote: > I have a bunch of GPIO groups all over the place (dedicated pins, UART pins, > ethernet pins, etc.), and even though they mainly behave similarly (same way of > handling direction and value), there are some differences between them: > - IRQs, because some groups can generate interrupts and others can't; > - Alternate functions (for instance GPIO mode vs UART mode), because obviously > dedicated pins don't have an alternate function, and for the others which have > it, the mode-changing register is sometimes before, sometimes after the other > regs. The basic problem is that you conceptualize of these things as GPIO and not the more abstract concept of pins under pin control. For example, there are not GPIO groups, there are pin control pin multiplexing groups. Please read Documentation/pinctrl.txt https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/pinctrl.txt Also read the generic pin control device tree bindings: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt Further in the GPIO subsystem you will find references back to how it interacts with pin control. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/gpio/gpio.txt Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html