Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kent Gibson <warthog618@gmail.com>,
	Vincent Fazio <vfazio@xes-inc.com>,
	linux-gpio@vger.kernel.org, brgl@kernel.org
Subject: Re: [PATCH RFC libgpiod 3/3] tools: implement gpioctl
Date: Mon, 19 Oct 2026 14:15:09 +0300	[thread overview]
Message-ID: <atX7veSMB-TPDQ0o@ashevche-desk.local> (raw)
In-Reply-To: <CAD++jLn86Xuv++nMO7BT0spXaw5NFbU4jZfS7++NWkgy0OG5kQ@mail.gmail.com>

On Fri, Oct 16, 2026 at 08:00:38PM +0200, Linus Walleij wrote:
> On Fri, Oct 16, 2026 at 4:21 PM Bartosz Golaszewski
> <bartosz.golaszewski@oss.qualcomm.com> wrote:
> 
> > Provide gpioctl, a new command-line tool for persistent GPIO line control.
> > Unlike gpioget and gpioset which release lines on exit, gpioctl holds
> > requested lines in a background daemon so their state survives across
> > multiple client invocations.
> >
> > The client auto-spawns the daemon on first use. Communication uses a
> > per-user abstract Unix-domain socket, providing automatic cleanup and
> > per-user isolation without filesystem artifacts.
> >
> > Each set of lines requested through the tool is assigned a unique ID and
> > referred to as a "request". The following sub-commands are provided:
> >
> >   request      - Request a set of GPIO lines by offset or name. The daemon
> >                  holds them after the client exits.
> >   release      - Release a previously made request by ID.
> >   requests     - List all requests currently held by the daemon.
> >   get          - Read values of requested lines.
> >   set          - Set the output values of requested lines.
> >   monitor      - Subscribe to edge events on a held request.
> >   reconfigure  - Change the settings of a held request in-place without
> >                  releasing it (e.g. switch direction, add edge detection).
> >
> > There are also "hidden" sub-commands that are not documented in the help
> > text but can be used for debugging purposes:
> >
> >   ping         - Verify the daemon is running (spawns it if not).
> >   stop         - Ask the daemon to exit, releasing all held lines.
> >   debug        - Run the daemon in the foreground with logging enabled.
> >
> > The wire protocol is intentionally private and unstable: only gpioctl
> > itself speaks it, so no ABI commitment is made.
> >
> > Also add test-cases covering all sub-commands and configuration options.
> > Update documentation, man page generation (main page plus one page per
> > sub-command), and mark the persistent-daemon TODO item as complete.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> 
> A big Acked-by: Linus Walleij <linusw@kernel.org> for the entire
> idea and approach.

Seconded here. But the amount is simply unreviewable by a human.

> I can't claim to have read the code in any detail, because it
> is quite a lot. I can run it through Sashiko if you want, hehe :D
> 
> I think this will be very helpful when doing automation using
> different AI tools, but also for pretty elaborate scripting.

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2026-10-19 11:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 14:18 [PATCH RFC libgpiod 0/3] tools: new tool - gpioctl Bartosz Golaszewski
2026-10-16 14:18 ` [PATCH RFC libgpiod 1/3] tools: factor out line value parsing into tools-common Bartosz Golaszewski
2026-10-16 14:18 ` [PATCH RFC libgpiod 2/3] tools: factor out line event formatting " Bartosz Golaszewski
2026-10-19 11:13   ` Andy Shevchenko
2026-10-21 10:35     ` Bartosz Golaszewski
2026-10-16 14:18 ` [PATCH RFC libgpiod 3/3] tools: implement gpioctl Bartosz Golaszewski
2026-10-16 18:00   ` Linus Walleij
2026-10-19  7:50     ` Bartosz Golaszewski
2026-10-19 11:15     ` Andy Shevchenko [this message]
2026-10-19 13:37   ` Vincent Fazio
2026-10-19 13:58     ` Bartosz Golaszewski

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=atX7veSMB-TPDQ0o@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=vfazio@xes-inc.com \
    --cc=warthog618@gmail.com \
    /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