Re: DT GPIO numbering?

From: Linus Walleij
Date: Sun Aug 05 2012 - 06:05:59 EST


On Wed, Aug 1, 2012 at 5:22 PM, Johannes Stezenbach <js@xxxxxxxxx> wrote:

> I'm currently learning how Linux devicetree support works,
> here is one question I couldn't find an answer for.
>
> I understand that within the devicetree GPIOs are referenced by phandle,
> thus the numbers are irrelevant. However, in sysfs the number is
> what is used to access the GPIO, e.g. for debugging or
> blinkenlight apps. How does this fit together?

I think it simply does not fit together.

Grant & me has been claiming the GPIO sysfs interface is a bit
crazy from time to time.

My long-term plan would be to replace it with /dev/gpio/gpioN
device nodes per-gpiochip and use ioctl etc to control these
beasts instead. However one does not do that overnight,
and my life is too busy, and other refactorings also need to
happen :-/

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/