Thread (12 messages) 12 messages, 7 authors, 2016-07-22

[PATCH] gpio: document how to order GPIO controllers

From: Linus Walleij <hidden>
Date: 2016-07-22 14:34:58
Also in: linux-devicetree, linux-gpio

On Wed, Jul 13, 2016 at 3:14 PM, Johan Hovold [off-list ref] wrote:
On Wed, Jul 06, 2016 at 02:34:39PM +0200, Linus Walleij wrote:
quoted
For the purpose of picking a certain named GPIO line (see below)
knowing this number is unnecessary. To that mechanism all gpio
chips are equal and the instance number does not matter.
My point was that with gpio line names (and possibly topological
information to resolve duplicates), the N number should not matter
anymore.
Agreed. It doesn't, with the new ABI. Not for technical reasons, at all.
If one needs to look up a particular gpiochip based on some hardware
naming convention, why not associate a name with the chip instead of
trying to shoehorn the dynamic gpiochip range in there?
With the new ABI it is possible to set a "label" for the gpiochip, currently
described as "a functional name for this GPIO chip, such as a product
number" and it's certainly possible to manage this name carefully for
a system to look up a certain chip.

[About obtaining topological  information from sysfs]
And this may even be unavoidable with dynamic buses such as USB or
greybus, where you can have multiple devices associating the same name
with a pin. That's fine as long as the user-space interface allows for a
way to distinguish them (e.g. through topological information).
This should work fine AFAICT. All the ABI and information is in place
to deal with this.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help