Re: Right amount of info in the DT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux