Re: [libgpiod] libgpiod v2.0 API discussion

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

 



On Thu, Nov 5, 2020 at 4:09 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
>

[snip]

>
> I'm also wondering if line bulk can be replaced with an analog of the
> uAPI line_request.  As the line bulk now only applies to a set of lines
> on one chip it has taken another step towards the line request, and
> cases where linke bulks are accepted or returned could be replaced with
> either a line request or a set of offsets on a particular request.

I was initially reluctant to take this into account but after thinking
about it over the weekend I figured out this may be a good idea.

What I have in mind is a new object: struct gpiod_line_request. This
would be returned by any request function and be internally associated
with the file descriptor returned by the request ioctl(). It would
also reference one or more lines for which the request was completed.
Unlike a bulk it would not allow users to modify the lines it
references. All value/event operations would take this as argument.
Maybe we could even drop the whole gpiod_line_bulk struct eventually.

I think it's a good approach going forward. Thanks for the suggestion Kent!

Bartosz



[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