]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: cdev: support edge detection for uAPI v2
authorKent Gibson <warthog618@gmail.com>
Mon, 28 Sep 2020 00:27:56 +0000 (08:27 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 30 Sep 2020 08:56:56 +0000 (10:56 +0200)
commit8cf80f07867557b1755651f9a9f9ebf652780f9f
tree6b73e8e480b972054957aef11d56a07ecb75e88f
parent9bacc9f5599324213f77e4957ec16fe29a5e1794
gpiolib: cdev: support edge detection for uAPI v2

Add support for edge detection to lines requested using
GPIO_V2_GET_LINE_IOCTL.

The edge_detector implementation is based on the v1 lineevent
implementation.  Unlike the v1 implementation, an overflow of the event
buffer results in discarding older events, rather than the most
recent, so the final event in a burst will correspond to the current
state of the line.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib-cdev.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h