Re: [PATCH 0/6] GPIO character device skeleton

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

 



On Sun, Oct 25, 2015 at 3:42 AM, Markus Pargmann <mpa@xxxxxxxxxxxxxx> wrote:
> On Thu, Oct 22, 2015 at 10:32:24AM +0200, Linus Walleij wrote:
>> OK so this is it, I had no patience waiting for users to come up
>> with this new ABI, and the requests for a way for userspace to
>> use GPIOs properly is coming up again and again. So I created the
>> basics for it, so we can then build on top of this to get things
>> right. I want to get these very first things right before we go
>> wild with setting/getting pin values etc.
>>
>> We add ONE ioctl() to get information on the gpiochip. Now we can
>> do this (example from ux500):
>>
>> root@Ux500:/ lsgpio
>> GPIO chip: a03fe000.gpio, 32 GPIO lines
>> GPIO chip: 8011e080.gpio, 32 GPIO lines
>> GPIO chip: 8011e000.gpio, 32 GPIO lines
>> GPIO chip: 8000e180.gpio, 32 GPIO lines
>> GPIO chip: 8000e100.gpio, 32 GPIO lines
>> GPIO chip: 8000e080.gpio, 32 GPIO lines
>> GPIO chip: 8000e000.gpio, 32 GPIO lines
>> GPIO chip: 8012e080.gpio, 32 GPIO lines
>> GPIO chip: 8012e000.gpio, 32 GPIO lines
>> GPIO chip: abx500-gpio, 42 GPIO lines
>> GPIO chip: tc3589x, 20 GPIO lines
>
> What happens if we have two I2C gpio expanders with the same I2C
> addresses connected to different I2C busses? If I see this correctly
> they would both show up with the same name. Is there an easy and
> race-free way to see which GPIO chip is connected to which I2C bus?

I suppose the bus path could be part of the GPIO chip name to avoid
this ambiguity, something like: 7000c000.i2c/0-001c.gpio
--
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