* gpiolib: GPIO_GET_LINEHANDLE_IOCTL and GPIO_GET_LINEEVENT_IOCTL at the same time
@ 2018-08-28 13:33 dimitry
0 siblings, 0 replies; only message in thread
From: dimitry @ 2018-08-28 13:33 UTC (permalink / raw)
To: linux-kernel; +Cc: dimitry
It seems gpiolib only allows user to request either the line handle descriptor or the line event descriptor, but not both at the same time.
gpiohandle_request hr;
gpioevent_request er;
...
ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, &hr); // so far so good
ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &er); // resource busy
I have a situation where I am trying to have 1 thread monitor an open drain/source line for events, while another thread writes to it. Not entirely unlike i2c pulse stretching. Is this not possible with the current gpiolib design? Or am I doing something wrong? If not possible, is my only choice to run an endless loop checking for line state?
NB: I am not subscribed to the list. Please CC me directly in your replies.
Thank you,
Dimitry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-28 13:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 13:33 gpiolib: GPIO_GET_LINEHANDLE_IOCTL and GPIO_GET_LINEEVENT_IOCTL at the same time dimitry
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).