Re: [PATCH] gpio: document how to order GPIO controllers

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

 



On Wed, Jul 13, 2016 at 3:14 PM, Johan Hovold <johan@xxxxxxxxxx> wrote:
> On Wed, Jul 06, 2016 at 02:34:39PM +0200, Linus Walleij wrote:

>> 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
--
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