lkml.org 
[lkml]   [2018]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectgpiolib: GPIO_GET_LINEHANDLE_IOCTL and GPIO_GET_LINEEVENT_IOCTL at the same time
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

\
 
 \ /
  Last update: 2018-08-28 15:33    [W:0.024 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site