linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: "Hollerer Franz, Schrack Seconet AG,
	Entwicklung"  <f.hollerer@schrack-seconet.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"Ullrich Lucas, Schrack Seconet AG,
	Entwicklung"  <l.ullrich@schrack-seconet.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [libgpiod]: non-exclusive use of input lines
Date: Thu, 13 Jul 2023 19:08:41 +0800	[thread overview]
Message-ID: <ZK/bOWcl0x/1zIY2@sol> (raw)
In-Reply-To: <1337f994e3ad45f49dc86787bcb3a019@schrack-seconet.com>

On Thu, Jul 13, 2023 at 09:24:03AM +0000, Hollerer Franz, Schrack Seconet AG, Entwicklung wrote:
> 
> I have several processes (one of them is a shell scripts, others are
> C/C++ programs) which need to read the same input line.
> Is it somehow possible to request input lines for non-exclusive use?

No, it is not possible.

> If not, is this a feature which will be added sometime in the future?
> 

No, there are no plans for such a feature, AFAIAA.

The solution is to have a userspace process monitor the line and share
the value with the other processes.  How best to do that is up to you.
A simple approach would be to write the value to a file.
(which might be a useful mode to add to gpiomon??)

Bart is working on a daemon that may provided shared read access, but
I'm just guessing.

Cheers,
Kent.


      reply	other threads:[~2023-07-13 11:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  9:24 [libgpiod]: non-exclusive use of input lines Hollerer Franz, Schrack Seconet AG, Entwicklung
2023-07-13 11:08 ` Kent Gibson [this message]

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=ZK/bOWcl0x/1zIY2@sol \
    --to=warthog618@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=f.hollerer@schrack-seconet.com \
    --cc=l.ullrich@schrack-seconet.com \
    --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).