linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libgpiod]: non-exclusive use of input lines
@ 2023-07-13  9:24 Hollerer Franz, Schrack Seconet AG, Entwicklung
  2023-07-13 11:08 ` Kent Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Hollerer Franz, Schrack Seconet AG, Entwicklung @ 2023-07-13  9:24 UTC (permalink / raw)
  To: linux-gpio@vger.kernel.org
  Cc: Hollerer Franz, Schrack Seconet AG, Entwicklung,
	Ullrich Lucas, Schrack Seconet AG, Entwicklung


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? If not, is this a feature which will be added sometime in the future?

Thanks

Franz Hollerer

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [libgpiod]: non-exclusive use of input lines
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Gibson @ 2023-07-13 11:08 UTC (permalink / raw)
  To: Hollerer Franz, Schrack Seconet AG, Entwicklung
  Cc: linux-gpio@vger.kernel.org,
	Ullrich Lucas, Schrack Seconet AG, Entwicklung,
	Bartosz Golaszewski

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-13 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).