Re: [PATCH v2] gpio: add userspace ABI for GPIO line information

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

 



On Fri, Feb 19, 2016 at 12:29 PM, Grant Likely <grant.likely@xxxxxxxxxx> wrote:
> [Me]
>> Here I lean toward the IIO event interface, that if you want to
>> monitor a GPIO line you should ask for an event file
>> descriptor and select() it waiting for events in userspace,
>> i.e. every such request comes with obtaining a new fd
>> and watching it.
>
> That seems overly heavyweight. It would be reasonable to select on a
> single file descriptor, and then on read it will also return a bitmap
> of which pin(s) actually raised the event.

Makes sense. But since GPIO controllers can supply hundreds of
GPIO lines we would however have make sure that this bitmap is
dynamic in size, a u32 or u64 won't work. So we should just pass the
offset number back with each event.

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