From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [libgpiod][PATCH 0/4] dedicated examples
Date: Thu, 15 Jun 2023 00:00:29 +0800 [thread overview]
Message-ID: <ZInkHSGf/HeBttPc@sol> (raw)
In-Reply-To: <CAMRc=McCKjU9NbarB-0awfUXwECMFna5aKi9yB68pwxHEebUhA@mail.gmail.com>
On Wed, Jun 14, 2023 at 05:11:32PM +0200, Bartosz Golaszewski wrote:
> On Wed, Jun 14, 2023 at 3:57 PM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > Any functionality to add to libgpiod?
> >
>
> I don't think so at the moment. Do you see anything obvious? I know,
> we spoke about putting the line resolver into libgpiod but I'm not
> sure we really want it. At least in the core library anyway. The GLib
> layer on top of libgpiod is a place that would be a good target for
> such a functionality IMO.
>
Yeah, making the line resolver generally available is a can of worms.
Not prepared to take that one on at the moment.
I'm reasonably content to leave that to the user - as long as they can
readily iterate over the chips and lines themselves.
Maybe provide an iterator for all the lines in the system
available to the user?
> Other than that, I think libgpiod now has everything it needs to cover
> all use-cases for the uAPI.
>
The point isn't that coverage is missing, it is to find ways to make
common tasks simpler.
The ones that spring to mind so far are:
- C: requesting a single line as output
- C: requesting a single line as input
- providing a toggle function for line_value, as it is an enum which is
a bit awkward.
- the chip iterator in the python tools helpers.py
- streaming operators for the enums where they are not automatically
provided
The C ones are specifically for simple sysfs-like equivalence, as telling
users they need to replace a single write to a file with ~100 lines of C
is really hard to sell.
The config options would be as minimal as possible.
I was going to suggest the user could always reconfigure the line later
if they need extra features, but there is no function to return the
existing line config :-(.
Cheers,
Kent.
next prev parent reply other threads:[~2023-06-14 16:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 3:54 [libgpiod][PATCH 0/4] dedicated examples Kent Gibson
2023-06-14 3:54 ` [libgpiod][PATCH 1/4] core: examples: add " Kent Gibson
2023-06-14 3:54 ` [libgpiod][PATCH 2/4] bindings: cxx: " Kent Gibson
2023-06-14 3:54 ` [libgpiod][PATCH 3/4] bindings: python: " Kent Gibson
2023-06-14 3:54 ` [libgpiod][PATCH 4/4] bindings: rust: " Kent Gibson
2023-06-14 7:52 ` Erik Schilling
2023-06-14 8:18 ` Kent Gibson
2023-06-14 8:29 ` Erik Schilling
2023-06-14 13:03 ` [libgpiod][PATCH 0/4] " Bartosz Golaszewski
2023-06-14 13:21 ` Kent Gibson
2023-06-14 13:26 ` Bartosz Golaszewski
2023-06-14 13:57 ` Kent Gibson
2023-06-14 15:11 ` Bartosz Golaszewski
2023-06-14 16:00 ` Kent Gibson [this message]
2023-06-15 15:16 ` Bartosz Golaszewski
2023-06-15 15:39 ` Kent Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZInkHSGf/HeBttPc@sol \
--to=warthog618@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).